1

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..

2 Answers 2

2

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
3
  • 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 Nov 20, 2009 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 Nov 20, 2009 at 12:20
  • -1 & -1 seem to mean nothing at all! Nov 20, 2009 at 12:21
2

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".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .