Start PowerShell ISE with the 2.0 runtime

前端 未结 2 2199
暗喜
暗喜 2021-02-20 13:24

When PowerShell 3.0 is installed, I can force PowerShell to start using the version 2.0

-Version
    Starts the specified version of Windows PowerShell.
    Ente         


        
2条回答
  •  灰色年华
    2021-02-20 13:52

    Tweaking the config file won't help, powershell_ise.exe definitely depends on .Net V4. It also depends heavily on the V3 version of the PowerShell engine.

    There is no supported way to run V2 of the PowerShell ISE after PowerShell V3 is installed. Unlike the core PowerShell binaries (like System.Management.Automation.dll) I think the V2 ISE binaries are either overwritten or removed as part of the V3 installation.

    I'm afraid you'll have to run your script from powershell.exe.

提交回复
热议问题