Appendix D. 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.

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

Table D-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

Copy

Copies a resource to another name or container

Duplicate, Clone, Replicate

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

Lock

Locks a resource

Restrict, Bar

Move

Moves a resource

Transfer, Name, Migrate

New

Creates a new resource

Create, Generate, Build, Make, Allocate

Push

Puts an item onto the top of a stack

Put, Add, Copy

Pop

Removes an item from the top of a stack

Remove, Paste

Remove

Removes a resource from a container

Delete, Kill

Rename

Gives a resource a new name

Ren, Swap

Search

Finds a resource (or summary information about that resource)in a collection; ...

Get Windows PowerShell Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.