CommandInvocationIntrinsics.GetCommandName(String, Boolean, Boolean) Method

Definition

Searches for PowerShell commands, optionally using wildcard patterns and optionally return the full path to applications and scripts rather than the simple command name.

public:
 System::Collections::Generic::List<System::String ^> ^ GetCommandName(System::String ^ name, bool nameIsPattern, bool returnFullName);
public System.Collections.Generic.List<string> GetCommandName (string name, bool nameIsPattern, bool returnFullName);
member this.GetCommandName : string * bool * bool -> System.Collections.Generic.List<string>
Public Function GetCommandName (name As String, nameIsPattern As Boolean, returnFullName As Boolean) As List(Of String)

Parameters

name
String

The name of the command to use.

nameIsPattern
Boolean

If true treat the name as a pattern to search for.

returnFullName
Boolean

If true, return the full path to scripts and applications.

Returns

A list of command names...

Applies to