사용자 도구

사이트 도구


windows:powershell

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
다음 판 양쪽 다음 판
windows:powershell [2022/01/02 19:03]
kwon37xi
windows:powershell [2022/03/10 10:03]
kwon37xi [Powershell script from remote]
줄 105: 줄 105:
 Invoke-WebRequest -Uri https://raw.githubusercontent.com/thomasmaurer/demo-cloudshell/master/helloworld.ps1 -OutFile .\helloworld.ps1; .\helloworld.ps1  Invoke-WebRequest -Uri https://raw.githubusercontent.com/thomasmaurer/demo-cloudshell/master/helloworld.ps1 -OutFile .\helloworld.ps1; .\helloworld.ps1 
 </code> </code>
-  * [[https://www.youtube.com/watch?v=omm2YUkTkg0&ab_channel=Twikki|How to run a Powershell script directly from Github private repository through Powershell - YouTube]] : github api 와 access token 으로 원격 스크립트 실행.+  * [[https://www.youtube.com/watch?v=omm2YUkTkg0|How to run a Powershell script directly from Github private repository through Powershell - YouTube]] : github api 와 access token 으로 원격 스크립트 실행. 
 +<code sh> 
 +# Created by Daniel Jean Schmidt 
 +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
  
 +$Script = Invoke-RestMethod https://api.github.com/repos/Twikki/youtubetest/contents/Download_Files.ps1?access_token=yourtokenhere -Headers @{”Accept”= “application/vnd.github.v3.raw”}
 +
 +Invoke-Expression $Script
 +</code>
 +  * [[https://tomtalks.blog/run-powershell-scripts-directly-github-two-lines/|Run PowerShell Scripts Directly from GitHub with Two Lines - Tom Talks]]
 +
 +<code>
 +# script 주소는 올바르게 변경할 것.
 +$ScriptFromGitHub = Invoke-WebRequest https://raw.githubusercontent.com/tomarbuthnot/Run-PowerShell-Directly-From-GitHub/master/Run-FromGitHub-SamplePowerShell.ps1
 +Invoke-Expression $($ScriptFromGitHub.Content)
 +</code>
 ===== tail ===== ===== tail =====
 마지막 1000 줄 보여주면서 계속 출력하기 마지막 1000 줄 보여주면서 계속 출력하기
windows/powershell.txt · 마지막으로 수정됨: 2024/03/05 13:00 저자 kwon37xi