Locates a command.
Get-CommandPath.ps1 [-ApplicationName] <String[]> [-FindAllInPath] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
Returns the full path to an application found in a directory in $env:Path, optionally with an extension from $env:PathExt.
Get-CommandPath.ps1 powershell
C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe
The name of the executable program to look for in the $env:Path directories, if the extension is omitted, $env:PathExt will be used to find one.
Type: String[]
Parameter Sets: (All)
Aliases: Name, AN
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Indicates that every directory in the Path should be searched for the command.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.