Cmdlets
Discovery and learning:
Get-Command [-Name Verb-*]: Filter by verbGet-Help CommandName -Examples: View examples (e.g.,Get-Help Get-Process -Examples)Get-Help about_*: Read built-in help topics (about_*)
Naming convention: Verb-Noun, common verbs include Get/Set/New/Remove/Start/Stop/Invoke/Test, etc. Use Get-Verb to view recommended verb list.
Common Parameters: Almost any supported cmdlet can use -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutVariable, etc.
Examples:
powershell
Get-Command -Verb Get -Noun Process
Get-Process -Name pwsh | Stop-Process -WhatIf # Preview, doesn't actually executeAliases:
ls/dir/gci->Get-ChildItemcat/type/gc->Get-Content%->ForEach-Object,?->Where-Object
Recommendation: Avoid aliases in scripts to ensure readability and portability.