如何从Powershell运行Powershell x86?

VSO*_*VSO 7 powershell

我读到了这个答案:如何从Powershell打开Powershell

start powershell
Run Code Online (Sandbox Code Playgroud)

这将打开基本的大分辨率PS实例.我如何打开PS(x86)?

Cal*_*off 13

Start-Process $Env:WINDIR\SysWOW64\WindowsPowerShell\v1.0\powershell.exe
Run Code Online (Sandbox Code Playgroud)


gms*_*man 6

我推荐Caleb的回答.但就个人而言,我在PowerShell配置文件中有一个函数,它在启动时加载并在运行时启动一个新的PowerShell x86 shell,x86因为这是非常常见的.

Function x86{
    Start-Process $($env:SystemRoot + "\syswow64\WindowsPowerShell\v1.0\powershell.exe")
}
Run Code Online (Sandbox Code Playgroud)

NB:$env:windir并且$env:SystemRoot在这里等同.也许不总是