Cmdlets, Get-Help and Get-Command

PowerShell · Essentials · 8 min

Discovering commands yourself is the core PowerShell skill; everything else can be looked up.

PowerShell commands are called cmdlets and follow a Verb-Noun naming pattern: Get-Process, Set-Location, New-Item, Remove-Item. The verbs come from an approved list (Get-Verb), so once you know the nouns you can often guess the command. Names and parameters are case-insensitive, and parameter names can be shortened as long as they stay unambiguous.

Three commands help you find your way:

  • Get-Command searches commands: Get-Command -Noun *Service* or Get-Command *json*.
  • Get-Help Name -Examples shows usage examples; -Full shows every parameter. Run Update-Help once to download the full help files, or use -Online to open the web page.
  • Get-Member (next lesson) shows what an object contains.

Many cmdlets have short aliases such as gci for Get-ChildItem, cd for Set-Location and % for ForEach-Object. Use aliases at the prompt but full names in scripts. On Linux and macOS, aliases like ls and cat are not defined, so those names run the native programs.

Two editions exist: Windows PowerShell 5.1 (powershell.exe, built into Windows, no longer developed) and PowerShell 7 (pwsh, cross-platform, current). This curriculum targets PowerShell 7.5; check yours with $PSVersionTable.

Example

$PSVersionTable.PSVersion.ToString()   # 7.5.3
Get-Command -Noun Process              # Get-Process, Start-Process, Stop-Process, ...
Get-Command *json* -CommandType Cmdlet # ConvertFrom-Json, ConvertTo-Json, Test-Json
Get-Alias gci                          # gci -> Get-ChildItem
Get-Help Get-ChildItem -Examples       # usage examples (run Update-Help once)
Get-Date -Format 'yyyy-MM-dd'          # 2026-10-17
get-date -f yyyy                       # case-insensitive, -f is short for -Format
(Get-Verb).Count                       # number of approved verbs

Remember

  • Cmdlets are Verb-Noun and case-insensitive
  • Get-Command finds commands, Get-Help -Examples shows how to use them
  • Aliases at the prompt, full names in scripts

Watch out for

  • Using aliases like ls or cat in cross-platform scripts: on Linux they run native programs with different output.

Check yourself

  1. You need a cmdlet that stops a Windows service but do not know its name. What is the best first step?
  2. Which executable is PowerShell 7?

Sign in to answer, see the explanations, and get this lesson back as a quick review later.

Official docs: learn.microsoft.com/en-us/powershell/scripting/overview