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)

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 string Create (System.Management.Automation.CommandMetadata commandMetadata);
Parameters
commandMetadata
CommandMetadata

An instance of CommandMetadata representing a command.

Returns

A string representing Command ScriptBlock.

Exceptions

commandMetadata is null.

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 string Create (System.Management.Automation.CommandMetadata commandMetadata, string helpComment);
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.