Sysprep Reposted from Microsoft

Sysprep Command-Line Options

7 out of 12 rated this helpful Rate this topic

Updated: October 20, 2013

Applies To: Windows 8, Windows 8.1, Windows Server 2012, Windows Server 2012 R2

Run Sysprep to prepare a Windows installation to be captured. This topic describes the command-line syntax for the Windows® 8 version of the System Preparation (Sysprep) tool.

If you intend to create an image of an installation for deployment to a different computer, you must run the Sysprep command together with the /generalize option, even if the other computer has the same hardware configuration. The Sysprep /generalize command removes unique information from your Windows installation so that you can safely reuse that image on a different computer. The next time that you boot the Windows image, the specialize configuration pass runs.

The following command-line options are available for Sysprep:

Sysprep.exe [/oobe | /audit]



[/reboot | /shutdown | /quit]



The following table lists Sysprep command-line options:

Option Description
/audit Restarts the computer into audit mode. Audit mode enables you to add additional drivers or applications to Windows. You can also test an installation of Windows before you send the installation to an end user. For example:

Sysprep /audit

If you specify an answer file, the audit mode of Windows Setup runs the auditSystem and auditUser configuration passes.

/generalize Prepares the Windows installation to be imaged. Sysprep removes all unique system information from the Windows installation. Sysprep resets the security ID (SID), clears any system restore points, and deletes event logs. For example:

Sysprep /generalize /shutdown

The next time that the computer starts, the specialize configuration pass runs. The configuration pass creates a new security ID (SID).

/oobe Restarts the computer into OOBE mode. For example:

Sysprep /generalize /shutdown /oobe

OOBE enables end users to customize their Windows operating system, create user accounts, name the computer, and perform other tasks. Sysprep processes any settings in the oobeSystem configuration pass in an answer file before OOBE starts.

/mode:vm New for Windows® 8. Generalizes a Virtual Hard Disk (VHD) so that you can deploy the VHD as a VHD on the same Virtual Machine (VM) or hypervisor. After the VM restarts, the VM can boot to OOBE. For example:

Sysprep /generalize /oobe /mode:vm

The only additional switches that apply to VM mode are /reboot, /shutdown, and /quit.You must deploy the VHD on a Virtual Machine (VM) or hypervisor with the same hardware profile. For example, if you created VHD in Microsoft Hyper-V, you can only deploy your VHD to Microsoft Hyper-V VMs with a matching hardware profile. Deploying the VHD to a different VM with a different hardware profile might cause unexpected issues.

You can only run VM mode from inside a VM..
/reboot Restarts the computer. You can use this option to audit the computer and to verify that the first-run experience operates correctly.
/shutdown Shuts down the computer after the Sysprep command finishes running.
/quiet Runs the Sysprep tool without displaying on-screen confirmation messages. You can use this option if you automate the Sysprep tool.
/quit Closes the Sysprep tool without rebooting or shutting down the computer after Sysprep runs the specified commands.
/unattend:<answerfile> Applies settings in an answer file to Windows during an unattended installation, where <answerfile> specifies the path and file name of the answer file to use. For example:

Sysprep /audit /reboot /unattend:F:Unattend.xml

where F is the drive letter of the portable storage device on which the answer file (Unattend.xml) is located.

You must use the Sysprep /generalize command to generalize a complete Windows installation before you can use the installation for deployment to a new computer, whether you use imaging, hard disk duplication, or another method. Moving or copying a Windows image to a different computer without running the Sysprep /generalize command is not supported.


1 out of 1 rated this helpful Rate this topic

Updated: October 20, 2013

Applies To: Windows 8, Windows 8.1, Windows Server 2012, Windows Server 2012 R2

During the specialize configuration pass of Windows® Setup, computer-specific information for the image is applied. For example, you can configure network settings, international settings, and domain information.

The specialize configuration pass is used together with the generalize configuration pass. The generalize pass is used to create a Windows reference image that can be used throughout an organization. From this basic Windows reference image, you can add additional customizations that apply to different divisions in an organization or to different installations of Windows. Any method of moving or copying a Windows image to a new computer must be prepared with the sysprep /generalize command. For more information, see Sysprep (System Preparation) Overview and Sysprep Command-Line Options.

The following diagram illustrates how the specialize configuration pass is used to apply these specific customizations.

specialize configuration passFor example, during the specialize configuration pass, you can specify different home pages in Internet Explorer® for different departments or branches in your business. This setting will then override the default home page.