CommandMetadata CommandMetadata CommandMetadata Constructors

Definition

Overloads

CommandMetadata(CommandInfo) CommandMetadata(CommandInfo)

Construct a CommandMetadata object for the given commandInfo

CommandMetadata(CommandMetadata) CommandMetadata(CommandMetadata) CommandMetadata(CommandMetadata)

A copy constructor that creates a deep copy of the other CommandMetadata object. Instances of Attribute and Type classes are copied by reference.

CommandMetadata(String) CommandMetadata(String) CommandMetadata(String)

Construct a CommandMetadata object for a script file.

CommandMetadata(Type) CommandMetadata(Type) CommandMetadata(Type)

Constructs a CommandMetadata object for the given CLS complaint type commandType.

CommandMetadata(CommandInfo, Boolean) CommandMetadata(CommandInfo, Boolean)

Construct a CommandMetadata object for the given commandInfo

CommandMetadata(CommandInfo) CommandMetadata(CommandInfo)

Construct a CommandMetadata object for the given commandInfo

public CommandMetadata (System.Management.Automation.CommandInfo commandInfo);
new System.Management.Automation.CommandMetadata : System.Management.Automation.CommandInfo -> System.Management.Automation.CommandMetadata
Parameters
commandInfo
CommandInfo CommandInfo CommandInfo

The commandInfo object to construct CommandMetadata for

Exceptions

If the commandInfo is an alias to an unknown command, or if the commandInfo is an unsupported command type.

CommandMetadata(CommandMetadata) CommandMetadata(CommandMetadata) CommandMetadata(CommandMetadata)

A copy constructor that creates a deep copy of the other CommandMetadata object. Instances of Attribute and Type classes are copied by reference.

public CommandMetadata (System.Management.Automation.CommandMetadata other);
new System.Management.Automation.CommandMetadata : System.Management.Automation.CommandMetadata -> System.Management.Automation.CommandMetadata
Public Sub New (other As CommandMetadata)
Parameters

CommandMetadata(String) CommandMetadata(String) CommandMetadata(String)

Construct a CommandMetadata object for a script file.

public CommandMetadata (string path);
new System.Management.Automation.CommandMetadata : string -> System.Management.Automation.CommandMetadata
Public Sub New (path As String)
Parameters
path
String String String

The path to the script file.

CommandMetadata(Type) CommandMetadata(Type) CommandMetadata(Type)

Constructs a CommandMetadata object for the given CLS complaint type commandType.

public CommandMetadata (Type commandType);
new System.Management.Automation.CommandMetadata : Type -> System.Management.Automation.CommandMetadata
Public Sub New (commandType As Type)
Parameters
commandType
Type Type Type

CLS complaint type to inspect for Cmdlet metadata.

Exceptions

If a parameter defines the same parameter-set name multiple times. If the attributes could not be read from a property or field.

CommandMetadata(CommandInfo, Boolean) CommandMetadata(CommandInfo, Boolean)

Construct a CommandMetadata object for the given commandInfo

public CommandMetadata (System.Management.Automation.CommandInfo commandInfo, bool shouldGenerateCommonParameters);
new System.Management.Automation.CommandMetadata : System.Management.Automation.CommandInfo * bool -> System.Management.Automation.CommandMetadata
Parameters
commandInfo
CommandInfo CommandInfo CommandInfo

The commandInfo object to construct CommandMetadata for

shouldGenerateCommonParameters
Boolean Boolean Boolean

Should common parameters be included in the metadata?

Exceptions

If the commandInfo is an alias to an unknown command, or if the commandInfo is an unsupported command type.

Applies to