简体   繁体   中英

PowerShell $PSVersionTable

I have PowerShell 3.0 installed, and I wish to emulate v1.0

When I launch PowerShell 3.0 with -Version 1 $PSVersionTable reports:

Name Value
---- -----
CLRVersion 2.0.50727.5456
BuildVersion 6.1.7601.17514
PSVersion 2.0
WSManStackVersion 2.0
PSCompatibleVersions {1.0, 2.0}
SerializationVersion 1.1.0.1
PSRemotingProtocolVersion 2.1

If I use the -Version 2 parameter I get the same result
If I use the -Version 3 parameter I get version 3.

Question, why can't I emulate version 1?

Looking at this answer , I don't think you can run 1 & 2 side-by-side without some surgery on the GAC (so it would follow that 1, 2 & 3 don't all co-exist either - only 2 & 3, because 2 & 3 were designed to run side by side). Version 2 was meant to completely replace version 1, AFAICT.

You can not run V1 using the side by side stuff. That was never supported. You CAN run V2 from V3, but not V1.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM