CommandInvocationIntrinsics.GetCommand Method

Definition

Overloads

GetCommand(String, CommandTypes)
GetCommand(String, CommandTypes, Object[])

Returns a command info for a given command name and type, using the specified arguments to resolve dynamic parameters.

GetCommand(String, CommandTypes)

public:
 System::Management::Automation::CommandInfo ^ GetCommand(System::String ^ commandName, System::Management::Automation::CommandTypes type);
public System.Management.Automation.CommandInfo GetCommand (string commandName, System.Management.Automation.CommandTypes type);
member this.GetCommand : string * System.Management.Automation.CommandTypes -> System.Management.Automation.CommandInfo
Public Function GetCommand (commandName As String, type As CommandTypes) As CommandInfo

Parameters

commandName
String

Returns

Applies to

GetCommand(String, CommandTypes, Object[])

Returns a command info for a given command name and type, using the specified arguments to resolve dynamic parameters.

public:
 System::Management::Automation::CommandInfo ^ GetCommand(System::String ^ commandName, System::Management::Automation::CommandTypes type, cli::array <System::Object ^> ^ arguments);
public System.Management.Automation.CommandInfo GetCommand (string commandName, System.Management.Automation.CommandTypes type, object[] arguments);
member this.GetCommand : string * System.Management.Automation.CommandTypes * obj[] -> System.Management.Automation.CommandInfo
Public Function GetCommand (commandName As String, type As CommandTypes, arguments As Object()) As CommandInfo

Parameters

commandName
String

The command name to search for.

type
CommandTypes

The command type to search for.

arguments
Object[]

The command arguments used to resolve dynamic parameters.

Returns

A CommandInfo result that represents the resolved command.

Applies to