How To Sysprep A Windows 10 Virtual Machine for Hyper-V or VMware


Sysprep is a Windows System Preparation Tool that prepares an installation of a running Windows for duplication, auditing and customer delivery. It enables you to capture a customized Windows image that you can reuse throughout an organization. A typical Sysprep process consists of the following steps:

  1. Install a Windows on a reference computer with all latest device drivers and updates.
  2. Install all other necessary applications and make all the customized changes.
  3. Once all done, run the command sysprep /oobe /generalize.
    1. The /oobe option instructs the Windows system to run Windows Welcome the next time the computer boots, giving an Out-of-Box Experience.
    2. The /generalize option tells Sysprep to remove system-specific data from the Windows installations.
  4. After the reference computer shuts down, you can boot to Windows PE on the same computer, and capture the Windows installation with ImageX. We actually have a post that you can refer to for details.

The Sysprep command is located in the following path:


You can either double-click the sysprep.exe executable file to launch it directly with a GUI like below:

System Preparation Tool 3.14 - 2016-07-28 23_14_02

or use it as a command line with a number of switches available.

System Preparation Tool 3.14 - usage

One of the switches, /mode, is new since Windows 8 that generalizes an image that can be deployed in a virtualized environment. Let’s say you have prepared a reference computer as a VM in Hyper-V,  to Sysprep it, run the following command inside the VM to .

Sysprep /generalize /oobe /mode:vm

The only additional switches that apply to VM mode are /reboot, /shutdown, and /quit.

Note #1: It works the best when deploying the VHD to a different VM with a matching hardware profile.

Note #2: While it’s stated that it works for VHD in Hyper-V environment, it should also work with VMware as well.

Note #3: You can’t deploy the /mode:vm prepared image to a physical machine.


Please enter your comment!
Please enter your name here