Server Core is an interesting “edition” of Windows Server 2008 and 2008 R2 that offers some potentially nice benefits: http://technet.microsoft.com/en-us/library/dd163517.aspx. Because of these benefits, many folks have started using Server Core in their enterprise but how can we start inventorying which systems are server core and which are not. This question lead me on a quick web search on how to find this info in WMI – we all know that WMI is ConfigMgr’s best friend right? This brought me to the Win32_OperatingSystem class and the OperatingSystemSKU attribute: http://msdn.microsoft.com/en-us/library/aa394239.aspx.

Upon reviewing sms_def.mof to see if this attribute is being collected or not, I discovered that the attribute is not even specified in sms_def.mof. Adding it to sms_def.mof is as simple as adding the following highlighted line to the Win32_OperatingSystem class definition though:

[SMS_Report (FALSE)     ]
    uint32     NumberOfProcesses;
[SMS_Report (FALSE)     ]
    uint32     NumberOfUsers;
[SMS_Report (TRUE)      ]
    uint32     OperatingSystemSKU;

[SMS_Report (TRUE)      ]
    string     Organization;
[SMS_Report (TRUE)      ]
    uint32     OSLanguage;
[SMS_Report (FALSE)     ]
    uint32     OSProductSuite;
[SMS_Report (FALSE)     ]
    uint16     OSType;

Make sure that you check dataldr.log for a success code on the site server after you modify the sms_def.mof to make sure that you haven’t mis-typed anything.

After each system refreshes its policy and performs a hardware inventory, you’ll be all set to use a simple query like this:

select SMS_R_System.Name, SMS_R_System.OperatingSystemNameandVersion, SMS_G_System_OPERATING_SYSTEM.OperatingSystemSKU from  SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceId = SMS_R_System.ResourceId

This query results in following in my lab:

image

The valid values for OperatingSystemSKU are listed at http://msdn.microsoft.com/en-us/library/aa394239.aspx. For my results above, 10 is Enterprise Server Edition, 4 is Enterprise Edition, and 13 is Standard Server Core Edition. Note that according to the documentation, this attribute only exists on Windows 6.0+ systems, i.e., Vista, 7, 2008 and 2008 R2, and thus MININT-KPGASIQ, which is a Windows XP system, cannot populate this value. Make sure that you take account of these NULL values when crafting your queries.