Using reg query to determine build number

by Mitch Tulloch [Published on 25 June 2015 / Last Updated on 25 June 2015]

A tip on how you can use a registry query to determine the build number of a Windows Server installation.

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.

See Also


The Author — Mitch Tulloch

Mitch Tulloch is a well-known expert on Windows Server administration and cloud computing technologies. He has published over a thousand articles on information technology topics and has written, contributed to or been series editor for over 50 books.