Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a VPS with PowerShell installed. How do I know if it's a RTM or CTP?

I ran $host.Version and I got :

Major  Minor  Build  Revision
-----  -----  -----  --------
2      0      -1     -1

WTF are the minus-one's? I've never seen negative numbers for any of a version fragments..

share|improve this question

2 Answers 2

up vote 2 down vote accepted

It seems that the more conventional way of getting the version number is using the $PSVersionTable which gives a build version value. Although $PSVersionTable.PSVersion gives me what you get.. Hmm -ve builds!!

If it makes you feel any better, I'm running PS Version 2 RTM on Windows 7 and i get the same result as you. My $PSVersionTable.BuildVersion is 6.1.7600.16385 which is the same version number i get when i look at the product version on the powershell.exe with:

(gcm "$PSHome\PowerShell.exe").FileVersionInfo.ProductVersion
share|improve this answer
    
Thanks... my BuildVersion seems to be 6.0.6002.18111 –  Andrei Rinea Nov 20 '09 at 11:19
    
So... having version 2.0.-1.-1 means I have the RTM? The reason for all the fuss is that some software (SharePoint 2010 beta for example) requires PowerShell 2.0 RTM –  Andrei Rinea Nov 20 '09 at 11:20
    
that build version looks to be v2 RTM. The Windows 7 ( & win2k8 R2) version seems to have a newer build of ps v2 –  Nick Kavadias Nov 20 '09 at 12:20
    
-1 & -1 seem to mean nothing at all! –  Nick Kavadias Nov 20 '09 at 12:21

You can get a little more detailed information like this:

PS > $PSVersionTable

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

And

PS > $Host


Name             : ConsoleHost
Version          : 2.0
InstanceId       : [obscured]
UI               : System.Management.Automation.Internal.Host.InternalHostUserI
                   nterface
CurrentCulture   : en-US
CurrentUICulture : en-US
PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
IsRunspacePushed : False
Runspace         : System.Management.Automation.Runspaces.LocalRunspace

I would interpret the "-1" values as "not applicable".

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.