클라우드/PoweShell
PowerShell 명령어
고고잉
2023. 3. 17. 20:22
구조
Verb(동사)-Noun(명사) -Parameter(옵션값) <Argement>
- Verb(동사) : 해야 할 액션
- Noun(명사) : 액션에 대한 타겟
- Parameter(옵션값) : 명사에 대한 옵션값
ex ) Get-Process -Name Winlogon
명령어
Get-Help (알고싶은)명령어
- Get-Help Get-Process
= Help (알고싶은)명령어
- Help Get-Process
= (알고싶은)명령어 -?
- Get-Process -?
Get-Command
- 명령어 목록 출력
Get-Command -type cmdlet
- let 타입의 명령어만 표시
Format
Get-Process | Format-Wide
Get-Process | Format-Wide -column 4
Get-Process | Format-List
- 리스트 ~~형식으로
Get-Process | Format-Table
Pipeline ( | )
- 앞에 있는 명령어 출력을 | 을 통해 다음값으로 넘김
get-service | where-object {$_.Displayname -Match "xbox"}
Tab
- 명령어 자동완성