5

I can easily pickup whether a server is Win2k3, 2k8, standard edition, enterprise edition, x86, x64, but I cannot find a way of determining if it's Release 1 or 2. HP Systems Insight Manager somehow manages it.

Arghhh!

1

2 Answers 2

5

ver on the command line will give you the version and build number. For 2008 R1/R2 in particular you can always check the build number:

http://en.wikipedia.org/wiki/Windows_NT#Releases

Although it's a bit harder to detect 2003 R1/R2, not sure if you want to?

EDIT: If you want build number or a plain text version number then you can also check the registry: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion

1
  • Thanks, found the reg value I needed - "ProductName". My previous registry hunt had failed, as I'd included "enterprise" or "standard" in my search string. The "ProductName" value just states something like "Windows Server 2008 R2". Oct 11, 2010 at 19:26
5

Have you looked at using WMI?

Win32_OperatingSystem

The Win32_OperatingSystem class represents an operating system installed on a Win32 computer system. Any operating system that can be installed on a Win32 system is a descendent (or member) of this class. Example: Microsoft Windows 95.

Win32_OperatingSystem Properties :

BuildNumber : The BuildNumber property indicates the build number of the operating system. It can be used for more precise versioning information than product release version numbers Example: 1381

BuildType : The BuildType property indicates the type of build used for the operating system. Examples are retail build and checked build.

Caption : The Caption property is a short textual description (one-line string) of the object.

Description : The Description property provides a description of the Windows operating system. Some user interfaces (those that allow editing of this description) limit its length to 48 characters.

ProductType : The ProductType property indicates additional information about the system. This member can be one of the following values: 1 - Work Station 2 - Domain Controller 3 - Server

ServicePackMajorVersion : The ServicePackMajorVersion property indicates the major version number of the service pack installed on the computer system. If no service pack has been installed, the value is zero. ServicePackMajorVersion is valid for computers running Windows 2000 and later (NULL otherwise).

ServicePackMinorVersion : The ServicePackMinorVersion property indicates the minor version number of the service pack installed on the computer system. If no service pack has been installed, the value is zero. ServicePackMinorVersion is valid for computers running Windows 2000 and later (NULL otherwise).

Version : The Version property indicates the version number of the operating system. Example: 4.0

2
  • +1 i like your answer better
    – BoyMars
    Oct 11, 2010 at 11:13
  • Thanks Guy. Haven't checked out WMI (for this anyway). I've now got the info I need from the Registry (see below). We now have many permutations of Windows Server available to us (Win2k3, 2k8, R1, R2, SP1, SP2, x86 and x64). Up to now, I didn't have the R1/R2 information captured. I have now! Oct 11, 2010 at 19:29

You must log in to answer this question.

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