a blog by Sander Berkouwer

It’s easy to tell whether Windows Server 2008 is installed as Server Core. I know what you’re thinking: “Duh! it only shows a command prompt window after you log on“, but that’s not what I wanted to show you today. What if you wanted to find out programmatically? What if you’re WinRS’ing into a Windows Server 2008 box?

Not the way to do this

I fiddled a bit to retrieve this information from my systems but couldn’t find a difference between full installations and server core installations when I used the following commands:

wmic OS get Caption

wmic OS get Name

systeminfo

Sure, I gathered a lot of information on the box and the Operating System I have installed, but couldn’t find a shred of information on how the Operating System was installed in terms of a Server Core installation or a Full Installation.

The way to do this

The solution to determine whether you’re dealing with a Server Core box, is to type the following command:

wmic OS get OperatingSystemSKU

When it returns any of the following values it’s a Server Core box:

OperatingSystemSKU
(output on console)

OperatingSystemSKU
(hexidecimal value)

Server Core Edition

12

0x0000000C

Windows Server 2008 Datacenter Edition, Server Core

39

0x00000027

Windows Server 2008 Datacenter Edition without Hyper-V, Server Core

13

0x0000000D

Windows Server 2008 Standard Edition, Server Core

40

0x00000028

Windows Server 2008 Standard Edition without Hyper-V, Server Core

14

0x0000000E

Windows Server 2008 Enterprise Edition, Server Core

41

0x00000029

Windows Server 2008 Enterprise Edition without Hyper-V, Server Core

29

0x0000001D

Windows Web Server 2008, Server Core

I agree a couple of other dead give-aways exist (checking for the existence of oclist.exe or SCregEdit.wsf would suffice as well) but none of these are really decent…

Concluding

When determining whether a server is a Server Core remotely isn’t as simply as typing a command and getting it served on a silver platter. You need to actually decipher a value using the table provided here.

Archives

Categories

The information on this website is provided for informational purposes only and the authors make no warranties, either express or implied. Information in these documents, including URL and other Internet Web site references, is subject to change without notice. The entire risk of the use or the results from the use of this document remains with the user.Active Directory, Microsoft, MS-DOS, Windows, Windows NT, and Windows Server are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. All other trademarks are property of their respective owners.