ProxyCommand.Create Method

Definition

Overloads

Create(CommandMetadata)

This method constructs a string representing the command specified by commandMetadata. The returned string is a ScriptBlock which can be used to configure a Cmdlet/Function in a Runspace.

Create(CommandMetadata, String)

This method constructs a string representing the command specified by commandMetadata. The returned string is a ScriptBlock which can be used to configure a Cmdlet/Function in a Runspace.

Create(CommandMetadata, String, Boolean)

This method constructs a string representing the command specified by commandMetadata. The returned string is a ScriptBlock which can be used to configure a Cmdlet/Function in a Runspace.

Create(CommandMetadata)

This method constructs a string representing the command specified by commandMetadata. The returned string is a ScriptBlock which can be used to configure a Cmdlet/Function in a Runspace.

public:
 static System::String ^ Create(System::Management::Automation::CommandMetadata ^ commandMetadata);
public static string Create (System.Management.Automation.CommandMetadata commandMetadata);
static member Create : System.Management.Automation.CommandMetadata -> string
Public Shared Function Create (commandMetadata As CommandMetadata) As String

Parameters

commandMetadata
CommandMetadata

An instance of CommandMetadata representing a command.

Returns

A string representing Command ScriptBlock.

Exceptions

commandMetadata is null.

Applies to

Create(CommandMetadata, String)

This method constructs a string representing the command specified by commandMetadata. The returned string is a ScriptBlock which can be used to configure a Cmdlet/Function in a Runspace.

public:
 static System::String ^ Create(System::Management::Automation::CommandMetadata ^ commandMetadata, System::String ^ helpComment);
public static string Create (System.Management.Automation.CommandMetadata commandMetadata, string helpComment);
static member Create : System.Management.Automation.CommandMetadata * string -> string
Public Shared Function Create (commandMetadata As CommandMetadata, helpComment As String) As String

Parameters

commandMetadata
CommandMetadata

An instance of CommandMetadata representing a command.

helpComment
String

The string to be used as the help comment.

Returns

A string representing Command ScriptBlock.

Exceptions

commandMetadata is null.

Applies to

Create(CommandMetadata, String, Boolean)

This method constructs a string representing the command specified by commandMetadata. The returned string is a ScriptBlock which can be used to configure a Cmdlet/Function in a Runspace.

public:
 static System::String ^ Create(System::Management::Automation::CommandMetadata ^ commandMetadata, System::String ^ helpComment, bool generateDynamicParameters);
public static string Create (System.Management.Automation.CommandMetadata commandMetadata, string helpComment, bool generateDynamicParameters);
static member Create : System.Management.Automation.CommandMetadata * string * bool -> string
Public Shared Function Create (commandMetadata As CommandMetadata, helpComment As String, generateDynamicParameters As Boolean) As String

Parameters

commandMetadata
CommandMetadata

An instance of CommandMetadata representing a command.

helpComment
String

The string to be used as the help comment.

generateDynamicParameters
Boolean

A boolean that determines whether the generated proxy command should include the functionality required to proxy dynamic parameters of the underlying command.

Returns

A string representing Command ScriptBlock.

Exceptions

commandMetadata is null.

Applies to