Gets the path to powershell.exe.
Get-PowershellPath [-x86] [<CommonParameters>]
Returns the path to the powershell.exe binary for the machine's default architecture (i.e. x86 or x64). If you're on a x64 machine and want to get the path to x86 PowerShell, set the x86
switch.
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
x86 | SwitchParameter | Gets the path to 32-bit PowerShell. | false | false |
Get-PowerShellPath
Returns the path to the version of PowerShell that matches the computer's architecture (i.e. x86 or x64).
Get-PowerShellPath -x86
Returns the path to the x86 version of PowerShell.