PowserShell은 .NET에서 구축된 명령줄 shell 및 script 언어 입니다.
#--- 도움말 관리
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 -?
#--- 별칭 관리
Get-Alias
Get-alias cls
Set-Alias -Name gi -Value Get-Item
#--- 변수 관리
#--- $변수명
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'
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 "~" #--- 글씨 표시
Powser Shell Script 실행 설정
Set-ExecutionPolicy Unrestricted
# Set-ExecutionPolicy RemoteSigned
# --- A (Yest to All) 입력