Training
Module
Perform post-installation configuration of Windows Server - Training
Perform post-installation configuration of Windows Server
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
You can use an answer file together with the System Preparation (Sysprep) tool to configure unattended Windows Setup settings. This topic describes some considerations and processes for using answer files together with Sysprep. For more information about Windows components and settings that you can add to an answer file, see the Unattended Windows Setup Reference.
If you specify a product key, Windows is automatically activated, and you can run the Sysprep command an unlimited number of times. To automatically activate Windows by supplying a product key, specify a valid product key in the Microsoft-Windows-Shell-Setup\ProductKey
unattend setting during the specialize configuration pass. If you don't automatically activate Windows by providing a product key, Windows prompts the end user for a product key.
Not all configuration passes run during Windows Setup. The generalize, auditSystem, and auditUser configuration passes are available only when you run Sysprep.
The following settings are only processed if you run Sysprep:
Settings in the auditSystem and auditUser configuration passes are processed when you boot into Audit mode after running the Sysprep /audit
command.
Settings in the generalize configuration pass are processed when you run the Sysprep /generalize
command. The generalize configuration pass removes the system-specific settings so that you can deploy the same image on multiple computers.
For more information, see How Configuration Passes Work.
If you use an answer file to install Windows, that answer file is cached to the system. When later configuration passes run, the computer applies settings in that answer file to the system. Because this answer file is cached, when you run the Sysprep command, the system applies settings in the cached answer file. If you want to use the settings from a different answer file, you can specify a separate Unattend.xml file by using the Sysprep /unattend:<file_name>
option.
You can persist device drivers when you run the Sysprep /generalize
command by using an answer file that has the Microsoft-Windows-PnPSysprep PersistAllDeviceInstalls component set to true. During the specialize configuration pass, Plug and Play scans the computer for devices, and then installs device drivers for the detected devices. By default, the computer uninstalls these device drivers from the system when you generalize the system.
In Audit mode, you can view the status for Microsoft-Windows-Deployment RunSynchronous commands that run during the auditUser configuration pass. The AuditUI window displays the status for commands and provides:
If the answer file contains Microsoft-Windows-Deployment RunSynchronous commands in the auditUser configuration pass, a list of the commands appears in the AuditUI window. The commands appear in the order that the Microsoft-Windows-Deployment-RunSynchronous-RunSynchronousCommand Order setting specifies. Each list item in the user interface is the string from one of these:
Sysprep processes all RunSynchronous
commands in order. If the command succeeds, its related list item receives a green check-mark annotation. If the command fails, its related list item receives a red X annotation. If the command requests a reboot, the AuditUI window appears after the boot, but only unprocessed list items appear. Previously processed items no longer appear in the AuditUI window. If the list of items in the AuditUI window exceeds the height of the display, the list is truncated to the display and doesn't scroll. As a result, you may not be able to see some items.
Windows Setup interprets the return codes as status values in the AuditUI window. A zero value indicates a success. A nonzero value indicates a failure. The return value of the command might affect the behavior of Windows Setup, depending on the value of the Microsoft-Windows-Deployment-RunSynchronous-RunSynchronousCommand WillReboot setting.
If the WillReboot
command is set to Always:
WillReboot
is set to either Always or Never.If the WillReboot
command is set to Never:
WillReboot
is set to either Always or Never.If the WillReboot
command is set to OnRequest:
Sysprep (System Preparation) Overview
Training
Module
Perform post-installation configuration of Windows Server - Training
Perform post-installation configuration of Windows Server