Check if PowerShell installed and version
To check if PowerShell is installed use:
HKLM\Software\Microsoft\PowerShell\1 Install ( = 1 )
To check if RC2 or RTM is installed use:
HKLM\Software\Microsoft\PowerShell\1 PID (=89393-100-0001260-00301) -- For RC2
HKLM\Software\Microsoft\PowerShell\1 PID (=89393-100-0001260-04309) -- For RTM
Also you could do the following
PS C:\Myworkplace\PS> get-host
Name : ConsoleHost
Version : 1.0.0.0
InstanceId : 2a52c07a-b708-430b-952a-af9f73431b46
UI : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture : en-US
CurrentUICulture : en-US
PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
PS C:\Myworkplace\PS> $host.version
Major Minor Build Revision
----- ----- ----- --------
1 0 0 0
But the above will only give you the host version not the file version and for most people that’s good enough.
In case you are curious, you could do the following
PS C:\Myworkplace\PS> (gcm "$PSHome\PowerShell.exe").FileVersionInfo.ProductVersion
6.0.5429.0