Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

CmdletAttribute Class

Definition

Namespace:
System.Management.Automation
Assembly:
System.Management.Automation.dll
Package:
Microsoft.PowerShell.5.1.ReferenceAssemblies v1.0.0
Package:
System.Management.Automation v7.4.15
Package:
System.Management.Automation v7.5.6
Package:
System.Management.Automation v7.6.1

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Identifies a class as a cmdlet and specifies the verb and noun identifying this cmdlet.

public ref class CmdletAttribute sealed : System::Management::Automation::CmdletCommonMetadataAttribute
[System.AttributeUsage(System.AttributeTargets.Class)]
public sealed class CmdletAttribute : System.Management.Automation.CmdletCommonMetadataAttribute
[<System.AttributeUsage(System.AttributeTargets.Class)>]
type CmdletAttribute = class
 inherit CmdletCommonMetadataAttribute
Public NotInheritable Class CmdletAttribute
Inherits CmdletCommonMetadataAttribute
Inheritance
Attributes

Constructors

Name Description
CmdletAttribute(String, String)

Initializes a new instance of the CmdletAttribute class.

Properties

Name Description
ConfirmImpact

Gets or sets a ConfirmImpact value that indicates the "destructiveness" of the operation and when it should be confirmed. This should only be used when SupportsShouldProcess is specified.

(Inherited from CmdletCommonMetadataAttribute)
DefaultParameterSetName

Gets or sets the cmdlet default parameter set.

(Inherited from CmdletCommonMetadataAttribute)
HelpUri

Gets or sets a HelpUri value that indicates the location of online help. This is used by Get-Help to retrieve help content when -Online is specified.

(Inherited from CmdletCommonMetadataAttribute)
NounName

Gets the cmdlet noun.

RemotingCapability

Gets or sets the RemotingBehavior value that declares how this cmdlet should interact with ambient remoting.

(Inherited from CmdletCommonMetadataAttribute)
SupportsPaging

Gets or sets a Boolean value that indicates the Cmdlet supports Paging. By default the value is false, meaning the cmdlet doesn't support Paging.

(Inherited from CmdletCommonMetadataAttribute)
SupportsShouldProcess

Gets or sets a Boolean value that indicates the Cmdlet supports ShouldProcess. By default the value is false, meaning the cmdlet doesn't support ShouldProcess.

(Inherited from CmdletCommonMetadataAttribute)
SupportsTransactions

Gets or sets a Boolean value that indicates the Cmdlet supports Transactions. By default the value is false, meaning the cmdlet doesn't support Transactions.

(Inherited from CmdletCommonMetadataAttribute)
VerbName

Gets the cmdlet verb.

Applies to