Q. How can I use a script to determine whether a Windows installation is a Server Core installation?

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

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish