PowerShell/README
Pnuskgh (토론 | 기여)님의 2020년 1월 14일 (화) 14:38 판 ("PowerShell/README" 문서를 보호했습니다 ([편집=관리자만 허용] (무기한) [이동=관리자만 허용] (무기한)))
PowerShell
PowserShell은 .NET에서 구축된 명령줄 shell 및 script 언어 입니다.
- <a href="https://github.com/powershell/powershell" target="_blank">https://github.com/powershell/powershell</a>
도움말
<code class="powershell">#--- 도움말 관리 Get-Command Get-Command *-Service Get-Command -Verb Get Get-Command -Noun Service Get-Command -CommandType Alias Get-Command -CommandType Function Get-Command -CommandType Script Get-Command Get-Service -Syntax Get-Help -Category Cmdlet Get-Help Get-Service Get-Help Get-Service -Detailed Get-Help Get-Service -Full Get-Help Get-Service -Parameter * Get-Help Get-Service -Examples man Get-Service help Get-Service Get-ChildItem -?</code>
별칭
<code class="powershell">#--- 별칭 관리 Get-Alias Get-alias cls Set-Alias -Name gi -Value Get-Item</code>
변수
<code class="powershell">#--- 변수 관리 #--- $변수명 Get-Command -Noun Variable | Format-Table -Property Name,Definition -AutoSize -Wrap Get-ChildItem variable: Get-ChildItem env: $env:SystemRoot $env:LIB_PATH='/usr/local/lib'</code>
유용한 명령어
<code class="powershell">Get-Location #--- 현재 폴더 Get-Locaiton | Out-Host -Paging #--- 한 페이지식 정보 표시 Get-Location | Get-Member #--- 반환되는 개체의 정보 표시 (Get-Location).ToString() Set-Location -Path ~ [-PassThru] Push-Location -Path ~ Pop-Location Write-Host "~" #--- 글씨 표시</code>
Powser Shell Script 실행 설정
<code class="powershell">Set-ExecutionPolicy Unrestricted
- Set-ExecutionPolicy RemoteSigned
- --- A (Yest to All) 입력</code>
참조 : PowerShell/README