8
1
http://msdn.microsoft.com/en-us/library/ff637750.aspx claims
Windows PowerShell 2.0 needs to be installed on Windows Server 2008 and Windows Vista only. It is already installed on Windows Server 2008 R2 and Windows 7.
However, powershell.exe lives here %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe. That doesn't seem like it would be PowerShell 2.0. The file version of powershell.exe is 6.1.7600.16385 so that doesn't help much either.
How do I know for sure if I have Window PowerShell 2.0 installed and if I don't, where is a download link for Windows 7?
Or use the
$Host
automatic variable. It's marked as implementation-specific in the specification, though (then again,Get-Host
doesn't appear at all in the spec). – Joey – 2011-05-06T17:45:07.487Get-Host doesn't appear at all in the spec -> That's weird. They just released that spec a couple of weeks ago. Wonder if that was an oversight? – None – 2011-05-06T19:09:08.243
Well, maybe it's not considered part of the core language cmdlets.
$Host
is also only implementation-defined. The specification apparently only covers the PowerShell language, not the API and host model. – Joey – 2011-05-06T19:25:45.597It doesn't cover the PSProviders either, but there's a get- for those. – None – 2011-05-06T20:14:39.243