cd \Windows\System32\Sysprep
sysprep /generalize /shutdown
sysprep
- Run Sysprep.
- If the System Preparation Tool window is still open, click Generalize, click Shutdown, and then click OK to generalize the image and shut down the PC.
-or-
- Run Sysprep from Command Prompt. Run %WINDIR%\system32\sysprep\sysprep.exe to open the System Preparation Window. You can also use the Sysprep command together with the /generalize, /shutdown, and /oobe options. See Sysprep command-line options to see available options.
%WINDIR%\system32\sysprep\sysprep.exe /generalize /shutdown /oobe
If you are generalizing a VHD that will be deployed as a VHD on the same virtual machine or hypervisor, use the /mode:vm option with the Sysprep command-line.
- The computer generalizes the image and shuts down.
-
After the computer shuts down, capture your image with DISM.
-
Deploy this image to a reference computer. When the reference computer boots, it displays the OOBE screen.
If you use multiple unattend files during your computer deployment, you can add the following settings to your each of your unattend files so Windows Setup will generalize the PC after processing the unattend file.
- To automatically generalize the image and shut down, use the Microsoft-Windows-Deployment | Generalize setting. Set Mode to OOBE or Audit, and set ForceShutdownNow to true.
-or-
- To generalize the system, and have it boot into Audit Mode, use the [Microsoft-Windows-Deployment | Reseal(/windows-hardware/customize/desktop/unattend/microsoft-windows-deployment-reseal) setting to the oobeSystem configuration pass. Set Mode to Audit.