Performing an Unattended Installation
Applies To: Windows Server 2008, Windows Server 2008 R2
You can automate the entire deployment for Windows Deployment Services. To do this, you will need to create two different unattend files (one for the Windows Deployment Services UI screens, and one for the later phases of Setup) and associate them using the procedures in this topic. Two files are necessary because Windows Deployment Services can deploy images that support the Unattend.xml format as well as images that do not support the Unattend.xml format (Windows Server 2003 and older versions of Windows).
This topic contains information about how to create these files, and instructions about how to configure the files on the server in order to automate the deployment.
For more detailed information, see Performing Unattended Installations (https://go.microsoft.com/fwlink/?LinkId=89226).
Prerequisites for performing an unattended installation
Ensure that you are a member of the Local Administrators group on the Windows Deployment Services server.
Ensure that you have sufficient credentials to add a computer to a domain. For more information, see Required Permissions (https://go.microsoft.com/fwlink/?LinkId=115301).
Windows Deployment Services client unattend file
First, create an Unattend.xml file with settings applicable to Windows Deployment Services client UI screens (for entering credentials, choosing an install image, configuring the disk, and so on). You should author the file by using Windows System Image Manager (SIM) from the Windows Automated Installation Kit (Windows AIK). For example files, see Sample Unattend Files (https://go.microsoft.com/fwlink/?LinkId=122642). For details about each section of the file, see the “Automating the User Interface Screens of the Windows Deployment Services client” section of Automating Setup (https://go.microsoft.com/fwlink/?LinkId=89226).
After you have created the file, you must associate it with a client. There are three ways you can do this:
Associate the client unattend file for all architectures. You can set a default client unattend file for all booting clients based on the architecture of the client. To associate an unattend file, use the following procedure or run
WDSUTIL /Set-Server /WDSUnattend /Policy:enabled /File:wdsclientunattend\unattend.xml /Architecture:<arch>
.To associate a client unattend file by architecture
Copy the client unattend file to RemoteInstall\WDSClientUnattend.
Open the Windows Deployment Services MMC snap-in, right-click the server that contains the image that you want to associate the unattend file with, and then click Properties.
On the Client tab, select Enable unattended installation, browse to the appropriate unattend file, and then click Open.
Click OK to close the Properties page.
Prestage a specific client with a client unattend file. You can use Windows Deployment Services to link physical computers to computer account objects in Active Directory Domain Services (AD DS). This is called prestaging the client. Prestaged clients are also called “known computers”. Prestaging a client allows you to configure properties on the computer account to control the installation for the client. For more information, see https://go.microsoft.com/fwlink/?LinkID=131987. Use the following procedure to prestage a client with an unattend file.
To prestage a client computer with a client unattend file
Click Start, right-click Command Prompt, and then click Run as administrator.
To prestage the computer, use the following syntax: WDSUTIL /Add-Device /Device:<name> /ID:<GUID or MAC>.
Example:
WDSUTIL /Add-Device /Device:Computer1 /ID:ACEFA3E81F20694E953EB2DAA1E8B1B6
To associate an unattend file with the prestaged client, use the following syntax where <path> is the relative path to the unattend file from the Remote Install folder: WDSUTIL /Set-Device /Device:<name> /WDSClientUnattend:<path>.
Example:
WDSUTIL /Set-Device /Device:Computer1 /WDSClientUnattend:WDSClientUnattend\Unattend.xml
Enable the Auto-Add policy and assign the client unattend file when you approve the installation. You can enable the Auto-Add policy to specify that unknown computers (computers that have not been prestaged in AD DS) require administrative approval before they will be allowed to boot against the server to install an operating system. Clients that are awaiting approval will be shown in the Pending Devices node of the MMC snap-in. If you approve the pending computer, the computer will continue booting from the network, and a computer account object will be created in AD DS to represent the physical computer. This is helpful because it gives you the ability to prestage computers without needing to know the client computer's GUID or MAC address in advance.
To enable the Auto-Add policy and associate a client unattend file
Right-click the server and click Properties.
On the PXE Response tab, select For unknown clients, notify administrator and respond after approval.
When an unknown computer boots to the server, the computer will appear in the Pending Devices node of the MMC snap-in. To approve the computer and associate an unattend file with it, use the following syntax where <path> is the relative path to the unattend file from the RemoteInstall folder: WDSUTIL /Approve-AutoAddDevices /RequestID:<ID> /WDSClientUnattend:<path>.
Example:
WDSUTIL /Approve-AutoAddDevices /RequestID:<ID> /WDSClientUnattend:WDSClientUnattend\Unattend.xml
Note
For more information about approving pending computers, see How to Manage Client Computers (https://go.microsoft.com/fwlink/?LinkID=115265).
Image unattend file
Next create an image unattend file, which automates the later phases of Setup (for example, offline servicing and Sysprep specialize). This file uses the Unattend.xml or Sysprep.inf format, depending on the version of the operating system of the image. See the Windows AIK for information about the settings in this file. For example files, see Sample Unattend Files (https://go.microsoft.com/fwlink/?LinkId=122642). After you have created the file, associate it with an image using the following procedure.
To associate an image unattend file
Create an Unattend.xml file (or a Sysprep.inf file for Windows Server 2003 and earlier versions of Windows) with settings applicable to the later phases of Setup.
The next steps depend on which file you create:
Save Sysprep.inf files. Save these files to the $OEM$ structure of the image (for example, D:\RemoteInstall\Images\Windows XP\winxpsp2\$OEM$\$1\sysprep\sysprep.inf). Now when you deploy the image, Setup will automatically locate and use the Sysprep.inf file.
Save Unattend.xml files. Save Unattend.xml files to any location, and then associate the file with an image. To do this, open the MMC snap-in, right-click the image that you want to associate with the unattend file, and then click Properties.
On the General tab, click Allow image to install in unattend mode, click Select File, browse to select the unattend file, and then click OK twice. The Unattend.xml file will be saved to the following location: \RemoteInstall\Images\<imagegroup>\<imagename>\Unattend\ImageUnattend.xml.
After you have configured both unattend files, you are ready to deploy an image. When you initiate a network boot, the installation will proceed using the settings from both unattend files.