liveBook · Manning

Approved verb

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

An approved verb is a verb recognized by PowerShell's command-naming conventions for describing a command's operation.

An approved verb is a PowerShell verb recognized by the standard Verb-Noun naming convention. The list is guidance rather than a hard restriction, but following it makes commands easier to discover and more native-looking. section 3.2 section 8.4

Use approved verbs as practical design constraints when creating commands:

  • Run Get-Verb to inspect the current approved list rather than guessing at a verb. section 3.2
  • Choose the verb that best describes the command's single operation; let separate commands handle filtering or other distinct work. section 6.5.2
  • Use a singular, organization-prefixed noun, such as Get-GlobalUser, to improve discovery and reduce naming conflicts. section 3.2 section 8.4
  • Check Microsoft Learn when distinctions are unclear, while recognizing that established commands may preserve older choices. section 8.4

Let the verb define the tool

Suppose a user-processing task enriches Active Directory objects and removes accounts that have never logged on. Rather than forcing both jobs into one command, create an Add-style enrichment tool and use Where-Object for filtering. The approved verb exposes the intended operation and encourages a reusable pipeline. section 6.5.2

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

How deep it goes
Explains the naming convention, list lookup, verb intent, and tool decomposition, but stops short of cataloging every approved verb.
Examples
Uses Get-GlobalUser, Add-style user enrichment, Where-Object filtering, and the Get-Content versus Read-Content distinction.
What it assumes
Assumes basic PowerShell command familiarity and teaches approved-verb lookup and intent-driven naming through examples.
What you can do after
Build it from scratch by selecting an approved verb and designing a discoverable, single-purpose PowerShell command.
How it connects
Connects approved verbs with Verb-Noun syntax, Get-Verb, Get-Command, Import-Module, Where-Object, and parameter naming.

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.