O'Reilly logo

Windows Server Cookbook by Robbie Allen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

2.1. Activating Windows Server 2003

Problem

You want to activate o r view the activation status of a Windows Server 2003 system. Microsoft requires that you activate Windows Server 2003 within 30 days of installation to validate you have a legal copy of the software.

Solution

Using a graphical user interface

  1. From the Start menu, select All Programs Activate Windows.

  2. Select whether you want to activate by phone or over the Internet.

Using a command-line interface

The following command opens the Activation wizard described in the previous section:

> %systemroot%\system32\oobe\msoobe /a

There are no options that can activate the computer silently from the command line.

Using VBScript

' This code activates a Windows Server 2003 system. ' ------ SCRIPT CONFIGURATION ------ strComputer = "." boolActivateOnline = True ' If this is true, boolActivateOffline should ' be false boolActivateOffline = False ' If this is true, boolActivateOnline should ' be false strOfflineConfirmationCode = "1234-5678" ' if Activating offline, you need ' specify a confirmation code ' ------ END CONFIGURATION --------- set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") set colWPA = objWMI.InstancesOf("Win32_WindowsProductActivation") for each objWPA in colWPA WScript.Echo "Activation Settings:" Wscript.Echo " Activation Required: " & objWPA.ActivationRequired Wscript.Echo " Caption: " & objWPA.Caption Wscript.Echo " Description: " & objWPA.Description Wscript.Echo " Notification On: " & objWPA.IsNotificationOn ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required