liveBook · Manning

Verb-noun naming format

As explained in Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools

A verb-noun pattern is a command-naming convention that combines an approved action verb with a descriptive noun.

A verb-noun naming format combines an approved PowerShell action verb with a singular, descriptive noun. Use a meaningful organizational prefix, such as Get-GlobalUser, rather than an ambiguous or overly long name. section 3.2

Use the convention to make tools feel native and easier to maintain:

  • Choose the verb from Get-Verb, treating the approved list as the standard even though PowerShell permits other verbs. section 3.2 section 8.4
  • Keep the noun singular and prefix it with an organization-specific name to improve discovery and avoid conflicts. section 3.2 section 8.4
  • Prefer native patterns because Get-Command searches by verb and noun, while Import-Module can warn about unapproved verbs. section 3.2

From descriptive to native

Replace ListAllIISWebServersInTheIISWebFarm with a concise verb-noun command. A company-specific tool might be Get-GlobalUser or Get-GloboSystemStatus. section 3.2 section 8.4

How Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools covers it

How deep it goes
Defines syntax, singular nouns, prefixes, and approved verbs, but stops short of implementing a command.
Examples
Uses Get-Verb, Get-GlobalUser, Get-GloboSystemStatus, and a deliberately overlong IIS server command.
What you can do after
Apply via Get-Verb and create organization-prefixed commands that fit PowerShell conventions.
How it connects
Connects command naming with approved verbs, Get-Command, Import-Module, and organizational prefixes.

Also explained in

Compare how 3 books explain verb-noun naming format →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools. The section links point to the parts of the book it draws on.