Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CommandMetadata Class

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Provides access to the metadata that describes a command, such as the name, type, and parameters of the command. This class is introduced in Windows PowerShell 2.0.

Namespace:   System.Management.Automation
Assembly:  System.Management.Automation (in System.Management.Automation.dll)

System::Object
  System.Management.Automation::CommandMetadata

public ref class CommandMetadata sealed 

NameDescription
System_CAPS_pubmethodCommandMetadata(CommandInfo^)

Creates a CommandMetadata object that contains information about the command. This constructor is introduced by Windows PowerShell 2.0.

System_CAPS_pubmethodCommandMetadata(CommandInfo^, Boolean)

Creates a CommandMetadata object that contains information about the command, plus an indicator that specifies whether common parameters should be added to the command. This constructor is introduced by Windows PowerShell 2.0.

System_CAPS_pubmethodCommandMetadata(CommandMetadata^)

Constructs a deep copy of another CommandMetadata object. This constructor is introduced by Windows PowerShell 2.0.

System_CAPS_pubmethodCommandMetadata(String^)

Creates a CommandMetadata object that contains a script file. This constructor is introduced by Windows PowerShell 2.0.

System_CAPS_pubmethodCommandMetadata(Type^)

Creates a CommandMetadata object that contains a cmdlet type. This constructor is introduced by Windows PowerShell 2.0.

NameDescription
System_CAPS_pubpropertyCommandType

Gets the .NET Framework type that defines the command. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyConfirmImpact

Gets and sets the impact level of the command action. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyDefaultParameterSetName

Gets and sets the parameter set that Windows PowerShell uses when it cannot determine the correct parameter set to use based on the user input. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyHelpUri

Related link URI for Get-Help -Online. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyName

Gets and sets the name of the command. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyParameters

Gets the parameters of the command. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertyPositionalBinding

When true, the command will auto-generate appropriate parameter metadata to support positional parameters if the script hasn't already specified multiple parameter sets or specified positions explicitly via the ParameterAttribute. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyRemotingCapability

The remoting capabilities of this cmdlet, when exposed in a context with ambient remoting. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertySupportsPaging

True if the cmdlet declared that it supports Paging, false otherwise. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertySupportsShouldProcess

Gets and sets a Boolean value that indicates whether the command requests confirmation before it makes a change to the system. This property is introduced in Windows PowerShell 2.0.

System_CAPS_pubpropertySupportsTransactions

Gets and sets a Boolean value that indicates whether the command supports transactions. This property is introduced in Windows PowerShell 2.0.

NameDescription
System_CAPS_pubmethodEquals(Object^)

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticGetRestrictedCommands(SessionCapabilities)

Retrieves information about how Windows PowerShell commands are restricted based on the capabilities of the session, such as sessions used for implicit and interactive remoting.

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

This information is used by the ProxyCommand class to create a proxy for the command described here.

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: