사용자 도구

사이트 도구


windows:powershell

차이

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

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
windows:powershell [2022/01/02 19:03]
kwon37xi
windows:powershell [2024/03/05 13:00]
kwon37xi
줄 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 줄 보여주면서 계속 출력하기
줄 162: 줄 176:
 Restart-Computer Restart-Computer
 </code> </code>
 +
 +===== Linux PowerShell =====
 +  * [[https://learn.microsoft.com/ko-kr/powershell/scripting/install/installing-powershell-on-linux|Installing PowerShell on Linux]]
 +  * [[https://learn.microsoft.com/ko-kr/powershell/scripting/install/install-ubuntu|Ubuntu에 PowerShell 설치]]
  
 ===== 참조 ===== ===== 참조 =====
   * [[https://gist.github.com/jchandra74/5b0c94385175c7a8d1cb39bc5157365e|PowerShell, Cmder / ConEmu, Posh-Git, Oh-My-Posh, Powerline Customization]]   * [[https://gist.github.com/jchandra74/5b0c94385175c7a8d1cb39bc5157365e|PowerShell, Cmder / ConEmu, Posh-Git, Oh-My-Posh, Powerline Customization]]
 +  * [[https://www.tutorialspoint.com/powershell/index.htm|Powershell Tutorial]]
  
windows/powershell.txt · 마지막으로 수정됨: 2024/03/05 13:00 저자 kwon37xi