Appendix B. Cmdlet Naming

The cmdlets installed with Windows PowerShell all follow a standard naming convention. In general, they use a verb–noun pair. For example, there are four commands that start with the verb add. "Add what?" you may ask. This is where the noun comes into play: Add-Content, Add-History, Add-Member, and Add-PSSnapin. When creating cmdlets, you should endeavor to follow the same kind of naming convention. The recognition of this naming convention is helpful in learning the cmdlets that come with Windows PowerShell.

Table B-1. Cmdlet Naming

Count

Verb

Examples

4

Add

Add-Content, Add-History, Add-Member

4

Clear

Clear-Content, Clear-Item

1

Compare

Compare-Object

1

ConvertFrom

ConvertFrom-SecureString

1

Convert

Convert-Path

2

ConvertTo

ConvertTo-Html, ...

Get Microsoft® Windows PowerShell™ Step By Step 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.