Q. How can I use a script to determine whether a Windows installation is a Server Core installation?
July 10, 2008
A. Server Core installations have different SKU from their full-installation siblings. Server Core SKUs are:
PRODUCT_STANDARD_SERVER_CORE - 0x0000000D
PRODUCT_ENTERPRISE_SERVER_CORE - 0x0000000E
PRODUCT_DATACENTER_SERVER_CORE - 0x0000000C
So check for an SKU value of 12, 13, or 14. In addition, you must worry about the non-Hyper-V versions, of which the SKUs are hex
28 (PRODUCT_STANDARD_SERVER_CORE_V)
29 (PRODUCT_ENTERPRISE_SERVER_CORE_V)
27 (PRODUCT_DATACENTER_SERVER_CORE_V)
You can find a full list of all Server Core SKU versions at msdn.microsoft.com/en-us/library/ms724358.aspx.
To determine the OS SKU, use the following sample code:
The output would be
In my example, 10 is A in hex, which means I'm running a full install of Server 2008 Enterprise edition. You can use the following sample script to find your OSs' SKUs:
The output would be
About the Author
You May Also Like