Home
Automating Windows Server 2008 installations Print E-mail
I’ve been working with a couple of customers on Windows Server 2008 automation, specifically non-Microsoft deployment and non-WDS automated builds. Seeing as I had quite a bit of fun, to put it mildly, getting these answer files working I thought I’d write a quick blog post or two on the subject.

Essentially, forgetting System Centre Configuration Manager (SCCM), Windows Deployment Services (WDS) and Microsoft Deployment (formerly Business Desktop Deployment, a.k.a. BDD) you’re left with two main options: performing an unattended (scripted) installation of Windows, or building and configuring a Windows Server image and SYSPREP’ing it. Both methods support answer files, the first (full scripted installation) mandates that this answer file be called autounattend.xml and must be stored on the root of some form or removable media, e.g. USB stick or CDROM while the second can be called anything and can reside anywhere –it just needs to be accessible when needed.

There’s already a substantial amount of information on deploying NT6.x at the moment, so I’m not going to reiterate it. The first place that you have to visit for information on this subject is the Microsoft Vista deployment site:
TechNet Vista/2008 Deployment

Although primarily geared at Windows Vista, most of this information also pertains to Windows Server 2008 -differences are described where applicable. Any changes mentioned for Vista Service Pack 1 (SP1) also apply to Windows Server 2008 as Vista SP1 and Windows Server 2008 share the same code base.

Anyway, enough with the introduction, let’s get to the point of this blog entry –a quick how to get started followed by my pain points...

Getting started

The following procedures are all done using the Windows System Image Manager (Windows SIM, or WinSIM) tool that is part of the Windows Automated Installation Kit (WAIK) which is a free download from Microsoft’s website and also a part of the Microsoft Deployment Toolkit.

For the purpose of creating an unattended installation file for either Windows unattended installation or SYSPREP unattended specialisation and out-of-box experience (OOBE) customisation the upper-most left-hand side pane, entitled distribution source, can be ignored. The important panes are “Windows Image”, “Answer File” and “Properties”.

Configuring Windows SIM

  • Right-click on the “---Select a Windows image or catalog file” text label in the “Windows Image” pane and choose “Select Windows image”.
  • Navigate to a copy of the INSTALL.WIM file that has been copied locally from the Windows installation media and, in the resultant dialog box select the version of Windows to work with, e.g. “Windows Longhorn SERVERENTERPRISE”.

Creating an answer file

  • The WAIK documentation provides a “walkthrough” document to build a simple answer file. The online version of this document is located here:
    How to build a simple answer file
  • Follow the instructions in this document to build the basic autounattend.xml file.
  • Use the following documentation for understanding individual properties:
    Autounattend.xml properties

Notable points

The following points are of note either because they were not immediately apparent to me or because a customer has asked me about it.

Please note that I’ve been working with the Volume License disk and have therefore not needed to worry about a product key. When I quickly tested this with my MSDN version my product key wouldn’t work until after Windows is built, therefore I had to get prompted for a product key, click next without entering one and then click No when asked do I want to enter a product key. Also, for simplicity I’ve laid out the component and properties separated with a pipe character “|” like in the documentation. I also start the line with the installation phase in square brackets [installation phase], e.g. [auditSystem] | Microsoft-Windows-Shell-Setup | UserAccounts | AdministratorPassword means the “AdministratorPassword” property of the “UserAccounts” key of the Microsoft-Windows-Shell-Setup component must be configured in phase 5: “auditSystem”.

Note. I’ve left out the platform, e.g. “x86_” or “amd64_” and the build version, e.g. “_6.0.6001.18000_neutral” for readability purposes. This means that Microsoft-Windows-Shell-Setup in the above example would actually look like this if using the 32-bit installation image:

    x86_ Microsoft-Windows-Shell-Setup_6.0.6001.18000_neutral


Regional settings

The correct syntax for the UK regional settings is as follows.

Note. Although the UInt32 representation has been used for the InputLocale the actual property is a string, which means that you can use either the numeric representation or the ISO string based en-GB.
[windowsPE] | Microsoft-Windows-International-Core-WinPE 
InputLocale 0809:00000809
SystemLocale en-GB
UILanguage en-US
UserLocale en-GB

[windowsPE] | Microsoft-Windows-International-Core-WinPE | SetupUILanguage
UILanguage en-US
WillShowOnError TRUE

SKU

As the Windows Server 2008 WIM contains the following SKUs we need to tell the setup program which one to install. This is done with the “MetaData” property:
    InstallFrom | MetaData property

    Windows Longhorn SERVERSTANDARD “1”
    Windows Longhorn SERVERENTERPRISE “2”
    Windows Longhorn SERVERDATACENTER “3”
    Windows Longhorn SERVERSTANDARDCORE “4”
    Windows Longhorn SERVERENTERPRISECORE “5”
    Windows Longhorn SERVERDATACENTERCORE “6”

I’ve been working on answer files configured to install Windows Server 2008 Enterprise Edition (x86). This is configured in the answer file as follows:

[windowsPE] | Microsoft-Windows-Setup | ImageInstall | OSImage | InstallFrom
Property: MetaData[Key=”/IMAGE/NAME”]
Value: Windows Longhorn SERVERENTERPRISE

Auto logon / Administrator Password

By default, Windows Server 2008 forces you to change (reset) the password of the built-in administrator account at first logon. To automate this phase the following properties need to be set in the audit system phase (phase 5) and, in the case of “AdministratorPassword” again in the OOBE phase (phase 7):

[auditSystem] | Microsoft-Windows-Shell-Setup | Autologon
Enabled: TRUE
LogonCount: 3 (must have a value for “enabled” to work)
Username: Administrator

[auditSystem] | Microsoft-Windows-Shell-Setup | Autologon | Password
Value:

[auditSystem] | Microsoft-Windows-Shell-Setup | UserAccounts | AdministratorPassword
Value:

[oobeSystem] | Microsoft-Windows-Shell-Setup | UserAccounts | AdministratorPassword
Value:

Server Role, Role Service and Feature installation

There are two ways of implementing the installation of server roles, role services and features:
  1. “Windows Feature Selections” of the Microsoft-Windows-Foundation-Package package
  2. Using SERVERMANAGERCMD command-line tool in a “SynchronousCommand”

The current [unofficial] recommendation is to use the second option: call SERVERMANAGERCMD via a synchronous command at first logon. To do this, you add your SERVERMANAGERCMD command as a SynchronousCommand in phase seven (OOBE):

[oobeSystem] | Microsoft-Windows-Shell-Setup | FirstLogonCommands
Property: SynchronousCommand[Order=”1”]
Value: c:\windows\system32\servermanagercmd.exe -install fs-fileserver fs-resource-manager print-server
wds-deployment desktop-experience rsat -resultpath %SYSTEMDRIVE%\Admin\svrmgrResults.xml -logpath
%SYSTEMDRIVE%\Admin\svrmgrLog.txt -restart

Moving forward it makes more sense to not embed the actual command statement in the answer file. It is probably a better idea to either call an XML unattended answer file (for Server Manager) from a network share, or call a script that either makes the decision for you or prompts you to make a choice of which answer file to run. This is something for the lab or maybe another blog post...




Del.icio.us!Technorati!StumbleUpon!Furl!
 
< Prev   Next >