Is there a 2.0 (or greater) version of the
I’m looking at the
PowerShell class in C# which says that this class was introduced with
PowerShell 2.0. Does that version number correspond with the version number I’m seeing when I add the reference to the assembly in Visual Studio?
This is kind of an additional question to my other question which is in regards to having trouble resolving the
PowerShell class inside that assembly.
I’ve tried the
System.Management.Automation assembly in both the GAC:
C:\Program Files\Reference Assemblies\Microsoft\WindowsPowerShell\v1.0
Both containing folders only have version 1.0
I have PowerShell 2.0 installed.
The strong name version for both powershell v1 and powershell v2 is
22.214.171.124. Surprising, yes, but this is a function of the backwards compatibility design. Both powershell v1 and v2 run on CLR2. Powershell v3 runs on CLR4, so they bumped the strong name version to
126.96.36.199 for that one.
Just to confuse matters further, the windows folder name for all versions is v1.0 – again, for reasons of compatibility.
The only way you could actually be running the real powershell v1.0 is if you’re on windows XP, vista or server 2003/2008. If you are running windows 7, 2008r2, you are on v2 at a minimum. If you are on 8 or 2012, you are on v3 of powershell at a minimum.
I hope this helps.