Using reg query to determine build number

You can use the reg query command to determine the build number of your Windows Server installation as follows:

reg query “HKLM\Software\Microsoft\Windows NT\Currentversion” /v currentbuild

For example, let’s say the output from running this command is this:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\Currentversion

    currentbuild    REG_SZ    7601

The build number returned from this query is 7601. You can then use the information below to determine which version of Windows Server you’re running:

6001 – Windows Server 2008

7600 – Windows Server 2008 R2

7601 – Windows Server 2008 R2 SP1

9200 – Windows Server 2012

9600 – Windows Server 2012 R2

Mitch Tulloch is an eleven-time recipient of the Microsoft Most Valuable Professional (MVP) award and a widely recognized expert on Windows Server and cloud computing technologies.  For more information see http://www.mtit.com.

Leave a Comment

Your email address will not be published.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top