Compartilhar via


CommandInvocationIntrinsics.GetCommands(String, CommandTypes, Boolean) Method

Definition

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...

Applies to