CommandInvocationIntrinsics.GetCommands(String, CommandTypes, Boolean) 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.
Searches for PowerShell commands, optionally using wildcard patterns.
public:
System::Collections::Generic::IEnumerable<System::Management::Automation::CommandInfo ^> ^ GetCommands(System::String ^ name, System::Management::Automation::CommandTypes commandTypes, bool nameIsPattern);
public System.Collections.Generic.IEnumerable<System.Management.Automation.CommandInfo> GetCommands (string name, System.Management.Automation.CommandTypes commandTypes, bool nameIsPattern);
member this.GetCommands : string * System.Management.Automation.CommandTypes * bool -> seq<System.Management.Automation.CommandInfo>
Public Function GetCommands (name As String, commandTypes As CommandTypes, nameIsPattern As Boolean) As IEnumerable(Of CommandInfo)
Parameters
- name
- String
The name of the command to use.
- commandTypes
- CommandTypes
Type of commands to support.
- nameIsPattern
- Boolean
If true treat the name as a pattern to search for.
Returns
Collection of command names...