🎓 A1Learner
🔍
0 of 52 lessons completed

PowerShell Cmdlets and Verbs

A cmdlet is a small built-in command with a verb-noun name. The verb says the action, and the noun says the thing acted on.

Read a cmdlet name

Get-Command looks up a cmdlet by name. The Name property holds its full name.

(Get-Command Get-Date).Name

Read the verb

The Verb property holds the action word. For Get-Date, the verb is Get.

(Get-Command Get-Date).Verb

Read the noun

The Noun property holds the thing word. For Get-Date, the noun is Date.

(Get-Command Get-Date).Noun

Example

(Get-Command Write-Output).Name
(Get-Command Write-Output).Verb
(Get-Command Write-Output).Noun

Key points

  • Verb: the action word in a cmdlet name, such as Get.
  • Noun: the thing word in a cmdlet name, such as Date.
  • Get-Date gets a date.
  • Write-Output writes a value to the output.
  • Use Get-Command to look up a cmdlet by name.
  • A property is one named piece of information about a result.

In this example, the first line prints the full cmdlet name, the second line prints its verb, and the third line prints its noun.

Try it Yourself

Edit the code, then press Run.

Running is simulated

Exercise

In Get-Date, what is Get?