다음을 통해 공유


Determining Whether Server Core Is Running

In Windows Server 2008 R2 and Windows Server 2008 see the GetProductInfo function to retrieve the product information for the current operating system. If Server Core is running, one of three values will be returned by GetProductInfo: PRODUCT_DATACENTER_SERVER_CORE, PRODUCT_ENTERPRISE_SERVER_CORE, or PRODUCT_STANDARD_SERVER_CORE. Calling GetProductInfo is the recommended way to test if Server Core is running on Windows Server 2008 R2 and Windows Server 2008.

In Server Core for Windows Server 2012 and later, the recommended way to determine Server Core is configured is to check these registry values:

  HKEY_LOCAL_MACHINE
   Software
      Microsoft
         Windows NT
            CurrentVersion
               Server
                  ServerLevels
                     NanoServer = 1
                     ServerCore = 1
                     Server-Gui-Mgmt = 1
                     Server-Gui-Shell = 1

The possible states of these values are:

  • Nano Server
    NanoServer=1

Windows Server 2012 R2 and Windows Server 2012: This configuration is not supported before Windows Server 2016.

  • Server Core
    ServerCore=1

  • Server Core with Management Tools
    ServerCore=1

    Server-Gui-Mgmt=1

    Not supported.

Windows Server 2012 R2 and Windows Server 2012: This minimal GUI configuration has management tools but does not contain Explorer, Internet Explorer, or features that depend on those features. This configuration is not supported starting with Windows Server 2016.

  • Full Server
    ServerCore=1

    Server-Gui-Mgmt=1

    Server-Gui-Shell=1