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

share|improve this question

2 Answers 2

up vote 3 down vote accepted

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

share|improve this answer
    
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". –  Simon Catlin Oct 11 '10 at 19:26

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

share|improve this answer
    
+1 i like your answer better –  BoyMars Oct 11 '10 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! –  Simon Catlin Oct 11 '10 at 19:29

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.