Sysprep.exe is a deployment tool that has several important uses. Specifically, you can use Sysprep to:
system-specific information from a Windows installation so that you can
capture an image from it using ImageX and then deploy the image on other
a Windows installation to boot into Audit mode so you can install
third-party device drivers and applications and test the functionality
of the system before capturing an image from it.
a Windows installation to boot to Windows Welcome the next time the
computer is started. This is typically done just before delivering the
computer to the end user or customer.
Reset Windows Product Activation up to three times.
Caution: Using Sysprep
You should use Sysprep
only on new, clean installations of Windows. You should not use Sysprep
on existing Windows installations, and you can’t use it on
The general syntax of the Sysprep command is as follows:
sysprep.exe [/oobe | /audit] [/generalize] [/reboot | /shutdown | /quit] [/quiet] [/unattend:answerfile]
Following are high-level descriptions of each Sysprep command option.
Restarts the computer into audit mode so you can add additional drivers
or applications to Windows and test the installation before delivering
it to the user.
Prepares the Windows installation for imaging by removing all unique
system information from the Windows installation, which means resetting
Security IDs (SIDs), clearing system restore points, and deleting event
logs. The specialize configuration pass then runs the next time the
system is booted, which means new SIDs are created and the Windows
activation clock is reset (provided the clock has not already been reset
the maximum three times allowed).
Restarts a computer running Windows into Windows Welcome mode to enable
users to customize their Windows installations by creating user
accounts, naming the computer, and performing other tasks. Any answer
file settings specified in the oobeSystem configuration pass are
processed immediately before Windows Welcome starts.
/reboot Restarts the computer—use this option when auditing the computer and for verifying that your OOBE customizations work properly.
/shutdown Shuts down the computer once Sysprep has finished its work.
/quiet Runs Sysprep without displaying any onscreen confirmation messages. This is useful when you need to automate Sysprep.
/quit Closes Sysprep after running the commands you specified.
/unattend:answerfile Applies settings contained in the specified answer file to Windows during unattended installation.
In addition to running
Sysprep from the command line or from scripts, you can also select
certain Sysprep options from the UI by typing %systemroot%\system32\sysprep\sysprep with no parameters following it, which opens the dialog box shown in Figure 6.
Figure 6. Sysprep Preparation dialog box
is generally useful for preparing Windows installations for image
capture, there are some limitations for its use with Windows Server
2008. Specifically, the following installed server roles cannot be resealed using sysprep /generalize for preparing them for imaging:
All Active Directory server roles, including AD CS, AD DS, AD FS, AD LDS, and AD RMS
Network Policy and Access Services
UDDI Services role
Windows Deployment Services
Windows SharePoint Services
For any of the roles
listed, you must install the particular role after installation is
finished for the role to work properly. In addition, the following
role-related limitations also apply to using Sysprep:
The Web Server (IIS) role does not support Sysprep with encrypted credentials in the applicationhost.config file.
The Terminal Services role does not support Sysprep when the master Windows image is joined to a domain.