🎓 A1Learner
🔍
0 of 52 lessons completed

PowerShell Getting Help

Getting help means asking PowerShell to describe a cmdlet. Get-Help is the cmdlet that gives that description.

Ask about Get-Date

Get-Help describes the cmdlet you name. Read its Name property back.

(Get-Help Get-Date).Name

Ask about Write-Output

The same pattern works for another cmdlet. Ask about Write-Output next.

(Get-Help Write-Output).Name

Ask about Get-Command

You can also ask about the lookup cmdlet itself. Ask about Get-Command next.

(Get-Help Get-Command).Name

Example

(Get-Help Get-Date).Name
(Get-Help Write-Output).Name
(Get-Help Get-Command).Name

Key points

  • Get-Help is the cmdlet that describes another cmdlet.
  • Use Get-Help with a cmdlet name to ask about that cmdlet.
  • The Name property holds the cmdlet name.
  • Reading help first helps you use a cmdlet correctly.

In this example, each line asks Get-Help about one cmdlet and prints that cmdlet name back.

Note

Help describes a cmdlet. It does not run the cmdlet.

Try it Yourself

Edit the code, then press Run.

Running is simulated

Exercise

Which cmdlet describes another cmdlet?