2

Windows 8 has PowerShell 3 installed

If I need to get PowerShell 2 I am using

PowerShell.exe -Version 2

But this runs against .NET CLR 2.0

I want to use .NET CLR 4.0

I tried all approaches from How can I run PowerShell with the .NET 4 runtime?

But I apply any of them and then

PowerShell.exe -Version 2

It will actually load PowerShell 3. To check this type

$host.Version

Is this a bug?

4

1 回答 1

0

PS的64位版本好像不支持版本2。在windows 8 64位上,需要运行32位版本。

这运行不支持 2.0 (BAD) 的 64 位版本:

%systemroot%\System32\WindowsPowerShell\v1.0\powershell.exe -version 2.0

这运行 32 位版本(好!):

%SystemRoot%\syswow64\WindowsPowerShell\v1.0\powershell.exe -version 2.0
于 2013-03-07T12:55:10.217 回答