CommandInvocationIntrinsics.GetCommand Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- type
- CommandTypes
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.