Chapter 10. Standard PowerShell Verbs

Cmdlets and scripts should be named using a Verb-Noun syntax—for example, Get-ChildItem. The official guidance is that, with rare exception, cmdlets should use the standard PowerShell verbs. They should avoid any synonyms or concepts that can be mapped to the standard. This allows administrators to quickly understand a set of cmdlets that use a new noun.

Note

To quickly access this list (without the definitions), type Get-Verb.

Verbs should be phrased in the present tense, and nouns should be singular. Tables 10-1 through 10-6 list the different categories of standard PowerShell verbs.

Table 10-1. Standard Windows PowerShell common verbs

Verb

Meaning

Synonyms

Add

Adds a resource to a container or attaches an element to another element

Append, Attach, Concatenate, Insert

Clear

Removes all elements from a container

Flush, Erase, Release, Unmark, Unset, Nullify

Close

Removes access to a resource

Shut, Seal

Copy

Copies a resource to another name or container

Duplicate, Clone, Replicate

Enter

Sets a resource as a context

Push, Telnet, Open

Exit

Returns to the context that was present before a new context was entered

Pop, Disconnect

Find

Searches within an unknown context for a desired item

Dig, Discover

Format

Converts an item to a specified structure or layout

Layout, Arrange

Get

Retrieves data

Read, Open, Cat, Type, Dir, Obtain, Dump, Acquire, Examine, Find, Search

Hide

Makes a display not visible

Suppress

Join

Joins a resource

Combine, Unite, Connect, Associate ...

Get Windows PowerShell Pocket Reference, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.