← Docs home

Specify the Cmdlet Attribute

📐 Rule.

For PowerShell to recognize a cmdlet, its .NET class must be decorated with the Cmdlet attribute.

The attribute specifies these features.

- The verb-and-noun pair

Identifies the cmdlet.

- The default parameter set

Used when multiple parameter sets exist and the runtime lacks enough information to pick one.

- Whether the cmdlet supports ShouldProcess

That method shows a confirmation message before the cmdlet changes the system.

- The impact level, or severity, of the confirmation action

Default to Medium in most cases.

Why.

The attribute is the contract the runtime reads to register, bind, and gate the cmdlet.