Explain the verb-noun naming convention in PowerShell cmdlets.

Beginner

Answer

PowerShell cmdlets follow a consistent verb-noun naming pattern that makes them intuitive and discoverable. The verb describes the action, and the noun describes what the action is performed on.

Common verbs:

  • Get: Retrieves information
  • Set: Changes or configures something
  • New: Creates something new
  • Remove: Deletes something
  • Start/Stop: Controls services or processes
  • Test: Validates or checks something

Examples: Get-Service, Set-Location, New-Item, Remove-File, Start-Process