Windows 7 / Getting Started

Activating the Server

Server Core includes the Slmgr.vbs script, which when passed with the -ato switch, performs an automated activation of the operating system. Slmgr.vbs is not a Server Core feature; it is present in Windows Vista and full Windows Server 2008 deployments and is the main license manager for the Vista/2008 products.

Because Server Core has no taskbar or system tray, you do not receive any prompts to activate the server, so remember to do so shortly after the installation of Server Core.

Before you activate, check your status to see how far into your initial 30-day grace period you are by using the -xpr switch as shown here:

C:\Windows\System32>cscript slmgr.vbs -xpr
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

Initial grace period ends 10/4/2007 2:48:10 PM

There is also more information available via the -dli switch or the -dlv switch to get detailed info.

C:\Windows\System32>cscript slmgr.vbs -dli
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

Name: Windows(TM) Server code name "Johnsay",
ServerEnterpriseCore edition
Description: Windows Operating System - Server code name
"Johnsay", RETAIL channel
Partial Product Key: 2T9PJ
License Status: Initial grace period
Time remaining: 42000 minute(s) (29 day(s))

If you have a normal license key or Multiple Activation Key (MAK) that activates with Microsoft, you can go ahead and just activate. However, if you have a local Key Management Service (KMS), tell the activation to use it via the -skms <KMS server> switch. If you need to clear the configured KMS server, use the -ckms switch. If you are using an enterprise license key, use the -ipk <key> switch.

To activate, use the -ato switch as previously mentioned. Rerun the display of license information to see the status is now licensed with no time remaining.

C:\Windows\System32>cscript slmgr.vbs -ato
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

Activating Windows(TM) Server code name "Johnsay",
ServerEnterpriseCore edition
(f00d81ce-df2c-47cb-a359-36d652296e56) ...
Product activated successfully.

C:\Windows\System32>cscript slmgr.vbs -dli
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

Name: Windows(TM) Server code name "Johnsay",
ServerEnterpriseCore edition
Description: Windows Operating System - Server code name
"Johnsay", RETAIL channel
Partial Product Key: 2T9PJ
License Status: Licensed

Installing Patches and Configuring Auto-Update

You can use various methods to patch Server Core. You can push patches with Group Policy or System Center Configuration Manager or any other deployment-type product. You can use Windows Update, which is disabled by default. (You can confirm that with the /au /v switches with scregedit.wsf.) To enable Windows Update to perform the normal 3 a.m. checks, run the following commands. The scregedit.wsf script is Serve Core-specific and was written to help perform the functions that are otherwise difficult to do from the command line. The script is installed automatically on all Server Core installations.

C:\Windows\System32>cscript scregedit.wsf /au 4
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

Registry has been updated.

C:\Windows\System32>net stop wuauserv
The Windows Update service is stopping.
The Windows Update service was stopped successfully.

C:\Windows\System32>net start wuauserv
The Windows Update service is starting.
The Windows Update service was started successfully.

You can force an update pass to run using the following command:

C:\Windows\System32>wuauclt /detectnow

You can't configure options to download patches and prompt for installation. You can either enable automatic download and application of patches or have automatic update turned off: There is no in-between configuration. You can always check the state of patch installations via the wmic qfe list command.

You can manually install patches using the wusa command, as in the following example:

wusa <patch name>.msu /quiet

Remember the patches all have applicability rules, so they won't install if the patch does not apply. If you want to check whether a patch applies, run the command without the /quiet switch. If you are prompted to install, it means the patch applies; if you are not prompted, it means the patch does not apply to Server Core and has been ignored.

[Previous] [Contents] [Next]