Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (2023)

With Windows System Preparation Tool (SysPrep), you can create customized Windows 10 or 11 reference images. You can install apps, drivers, and slipstream updates to a Windows installation image. After that, you can deploy your reference Windows image to users’ computers within your company.

[ez-toc]

In this guide, we’ll show how to use SysPrep to create the ready reference Windows image (we will use Windows 10 22H1 or Windows 11 22H2 builds in this example). You can use this image to deploy Windows on physical or virtual machine (VDI solutions).

What is SysPrep?

Before deploying a Windows image on users’ computers, you need to configure a reference computer. Download the latest Windows build (you can use the Media Creation tool to make Windows installation media) and perform a clean Windows installation on a reference computer or virtual machine. Install the necessary drivers, applications, and configure other Windows settings. The resulting image must be generalized by deleting computer-specific information (SID, GUID, etc.). You can generalize the Windows image with the SysPrep utility.

All the configuration of the operating system before you run Sysprep remains untouched. This includes the installed software, personalization and network settings, installed and pinned Microsoft Store (UWP/Modern) apps on the start screen, File Explorer, and other parameters.

In Windows 10/11 and Windows Server 2019/2022, the Sysprep.exe utility is located in folder C:\Windows\System32\sysprep.

Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (1)

After you installed and configured the reference Windows 10 image in the correct way (with certain installed software, operating system settings, and permissions), you can deploy it to all computers of the company using MDT, WDS, SCCM, or manually (take a look at Windows 10 deployment with MDT and WDS).

Benefits and Disadvantages of Using Sysprep

Syprep’s benefits:

  • The customized reference Windows 10/11 image allows you to quickly deploy a ready-to-work environment on a user’s computer. You do not need to install drivers, programs, or security updates. Also, no need to configure custom Windows Settings on each computer;
  • You can deploy the Windows image using the answer (unattended.xml) file. After the installation, you do not need to select the various options on the initial Windows Setup screen;
  • At any time, you can extract the image, make changes to it, and update it with the deployment tool.

Disadvantages of Sysprep:

  • The size of the Windows reference image can be significantly larger than the clean Windows 10 or 11 installation ISO image;
  • Periodically you have to update the versions of programs and drivers injected into the reference image, and install the latest security updates;
  • You cannot use the Sysprep tool on domain-joined computers. Sysprep will remove the computer from the AD domain;
  • You can run Sysprep up to 1001 times on a single Windows image. After reaching this limit, you should recreate your Windows image.

How to Create a Windows 10 or 11 Reference Image?

You can create your reference WIM image of Windows 11 or 10 through the following steps:

  1. Perform a clean Windows 10/11 install from the ISO image or installation USB stick, then enter the Audit Mode;
  2. Install apps, drivers, and language packs. Then set the time zone, and configure other personalization settings;
  3. Prepare the operating system environment using the Sysprep utility;
  4. Boot into Windows PE and capture an image using the DISM tool.

Then, the resulting image WIM can be added to the installation disk or deployed using different tools such as MDT, WDS, DISM, or ImageX.

When using Sysprep on modern builds of Windows 11 and Windows 10, you need to ensure that your reference computer or the virtual machine does not have Internet access during the image build and capture process. The fact is that Windows will aggressively update the built-in Windows Store applications if you have Internet access. This may break your Sysprep routine.

In order to disable the automatic updating of Windows store apps:

  1. Unplug the Internet connection (Ethernet) or disable your Wi-Fi adapter;
  2. Run the Local Group Policy Editor (gpedit.msc) and navigate to Computer Configuration > Administrative Templates > Windows Components > Store;
  3. Enable the policy Automatic Download and Install of updates; Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (2)

If you don’t want to completely block Internet access, set the following ImageState registry parameter:

reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State" /v ImageState /t REG_SZ /d IMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE /f

And then make changes to file C:\Windows\Setup\State\State.ini

[State]ImageState=IMAGE_STATE_SPECIALIZE_RESEAL_TO_OOBE

Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (3)

This will stop Sysprep from failing while processing Microsoft Store apps.

Customizing Windows 11 and 10 in Audit Mode with Sysprep

You need to customize your reference Windows Image in the Audit Mode. You can boot Windows to Audit Mode or OOBE by pressing Shift + Ctrl + F3 on the OOBE (out-of-box experience user experience), or the Windows Welcome screen. You can also enter Audit Mode using Sysprep. To do this, open the Sysprep folder with File Explorer, hold down Shift, right-click on an empty space and select the Open PowerShell windows here or Open in Windows Terminal option.

Then run the command:

C:\windows\system32\sysprep\sysprep.exe

Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (4)

In the System Preparation Tool window, select the options:

  • System Cleanup Action: Enter System Audit mode;
  • Shutdown Options: Reboot;
  • Press the OK button.

Sysprep on Windows can be run from the command line with basic options:

sysprep.exe [/oobe | /audit] [/generalize] [/reboot | /shutdown | /quit] [/quiet] [/unattend:answer_file_name]

  • /audit — starts Windows in audit mode. In this mode, you can install additional apps and drivers;
  • /generalize — preparing Windows for image capture. All identifiers, logs, Event Viewer logs, and restore points are removed;
  • /oobe — restarts the Windows in the Welcome screen mode. The Windows Welcome screen allows users to configure Windows operating system, create new accounts, rename the computer, and perform other tasks;
  • /unattend:answer_file_name — allows you to apply the settings from the answer file to Windows during an unattended installation.

Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (5)

In our case, Sysprep returns the following error:

System Preparation Tool 3.14

Sysprep was not able to validate your Windows installation. Review the log file at %WINDIR%\System32\Sysprep\Panther\setupact.log for details. After resolving the issue, use Sysprep to validate your installation again.

To find out the reason why Sysprep cannot start on your computer, press Win + R and run the command:

%WINDIR%\System32\Sysprep\Panther\setupact.log

Look for the Error lines in the setupact.log file. In our case, the error looks like this:

2021-11-19 06:12:56, Error SYSPRP Sysprep_Clean_Validate_Opk: Audit mode cannot be turned on if reserved storage is in use. An update or servicing operation may be using reserved storage.; hr = 0x800F09752021-11-19 06:12:56, Error SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing ‘Sysprep_Clean_Validate_Opk’ from C:\Windows\System32\spopk.dll; dwRet = 0x9752021-11-19 06:12:56, Error SYSPRP SysprepSession::Validate: Error in validating actions from C:\Windows\System32\Sysprep\ActionFiles\Cleanup.xml; dwRet = 0x9752021-11-19 06:12:56, Error SYSPRP RunPlatformActions:Failed while validating Sysprep session actions; dwRet = 0x9752021-11-19 06:12:56, Error [0x0f0070] SYSPRP RunDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x9752021-11-19 06:12:56, Error [0x0f00d8] SYSPRP WinMain:Hit failure while pre-validate sysprep cleanup internal providers; hr = 0x80070975

Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (6)

In our case, the reason for the Sysprep error is specified here: “An update or servicing operation may be using reserved storage”. This means you cannot use Sysprep at this time, because your Windows image is locked by some changes. This can be installed updates, installation of Windows features, system programs, antiviruses, etc.

Go to Settings > Windows Updates. As you can see, there are several Pending Updates. Finish installing security updates, restart your computer, and run Sysprep again.

Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (7)

Tip. Another error “Sysprep was not able to validate your Windows installation” was covered previously.

For other Sysprep errors, you can get detailed information from the log filex. Depending on the stage, Sysprep can write information to one of the directories:

  • Generalize — %WINDIR%\System32\Sysprep\Panther.
  • Specialize — %WINDIR%\Panther.
  • Windows Unattended installation — %WINDIR%\Panther\UnattendGC.

The computer will automatically restart and boot to Audit Mode. Windows automatically boots and logs in with the built-in administrator account when in Audit Mode. Further, this account will be disabled.

Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (8)

Windows 11/10 will boot in this mode no matter how many times you reboot your computer until the Sysprep is running.

There is only one visible sign to understand that you’ve entered the Windows Audit Mode desktop — the Sysprep dialog in the middle of the display. Do not close the Sysprep utility window — you will need it at the end of the configuration step. Minimize it.

Configure your Windows reference image in the Audit Mode. We will take a look at several popular steps that sysops configure most often in their reference image.

Step 1: Install OEM Information and Logo

You can set your company branded info in the computer properties windows. In this example, we will configure OEMLogo, Company name, tech support website, and working hours. The easiest way to configure these settings is through the registry. Create a text file oem.reg, and copy the following code into it:

Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation]“Logo”=”C:\\WINDOWS\\oem\\OEMlogo.bmp”“Manufacturer”=”TheITBros, LLC”“Model”=”Windows 10 Pro 21H1”“SupportHours”=”9am to 5pm ET M-F”“SupportURL”=”https://theitbros.com”

Note. First, create the graphic file C:\WINDOWS\oem\OEMlogo.bmp with your company logo.

To apply the REG file, double-click on it, and accept registry changes. As a result, these settings will be imported into the registry.

Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (9)

After rebooting in the System Properties, you can see the following branded info:

Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (10)

Step 2: Install the Drivers and Apps

You can install drivers and third-party programs you would like to see in your Windows 10/11 image.
You can install programs manually, or using the new built-in Windows package manager — WinGet. The WinGet Package Manager is available on current builds of Windows 10 and 11 and allows you to install the required software (about 4000 programs available in WinGet repo).

Let’s say, we want to install Opera, Google Chrome, VLC media player, Adobe Acrobat Reader DC, 7Zip, K-Lite Codec Pack Full, and Zoomit using winget. Open the elevated PowerShell prompt and run the command:

winget install --id=7zip.7zip -e && winget install --id=Opera.Opera -e && winget install --id=Google.Chrome -e && winget install --id=VideoLAN.VLC -e && winget install --id=Adobe.Acrobat.Reader.32-bit -e && winget install --id=CodecGuide.K-LiteCodecPack.Full -e && winget install --id=Zoom.Zoom –e

Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (11)

Tip. You can use the WinGet online repository browser (https://winstall.app/) to select the programs you want to install and generate the WinGet installation script.

Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (12)

Note. Don’t install or update any Microsoft Store apps on a reference computer.

You can also install drivers for all computers and laptops models on which you want to deploy this reference Windows 10/11 image. Download and extract the driver packages to a specific directory. Then search for all *.inf files, and inject all the drivers from the source folder to the Windows image with the PowerShell command:

Get-ChildItem "C:\Drivers\" -Recurse -Filter "*.inf" |ForEach-Object {PNPUtil.exe /add-driver $_.FullName /install}

If you need to reboot Windows to install the application or update, you can do it. After reboot, the system will return to audit mode.

Note. You can remove old drivers from driver repository using our script.

Step 3: Disable Telemetry and Data Collection in Windows 10/11

Windows 10 and 11 collect information about the operation of users on the computer. Examples of handwriting and voice samples, location information, error reports, calendar contents — all of these can be sent to Microsoft servers.

If you do not want the OS sending data to Microsoft’s telemetry servers, you can disable the Telemetry and Data Collection services. Run the elevated Command prompt, and execute the following commands:

sc delete DiagTracksc delete dmwappushserviceecho ““ > C:\ProgramData\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-DiagTrack-Listener.etlREG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v AllowTelemetry /t REG_DWORD /d 0 /f

Also, you can disable tracking in Windows 10 and 11 using the DisableWinTracking tool from GitHub.

Step 4: Install Windows Security Update in Audit Mode

Currently, you cannot install Windows updates in the audit mode using the Windows Update section in the Settings panel. The Windows Update checks if the system has completed the OOBE stage. If not, the update won’t be installed.

You can install the security updates from the command prompt using the PSWindowsUpdate Module from PowerShell Gallery. You can install online the PSWindowsUpdate in Windows using the command:

Install-Module -Name PSWindowsUpdate

To download and install all available Windows updates, run the commands:

PowerShell -ExecutionPolicy RemoteSigned -Command Import-Module PSWindowsUpdate;Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -AutoReboot

That’s all! Available updates will be downloaded from the Windows Update servers and installed automatically.

Step 5: Uninstall Built-in Microsoft Store Apps

Also, you can uninstall built-in Microsoft Store (UWP apps), but it’s really up to you. So, if you don’t want to uninstall built-in apps, just skip this step.

You can remove pre-installed Microsoft Store apps in Windows 10 21H2 and Windows 11 22H2 using the following PowerShell commands:

#AV1 CodecGet-AppxPackage *AV1VideoExtension* | Remove-AppxPackage#News appGet-AppxPackage *BingNews* | Remove-AppxPackage#WeatherGet-AppxPackage *BingWeather* | Remove-AppxPackage#PowerShellGet-AppxPackage *PowerShell* | Remove-AppxPackage#WebP image supportGet-AppxPackage *WebpImageExtension* | Remove-AppxPackage#HEIF image supportGet-AppxPackage *HEIFImageExtension* | Remove-AppxPackage#Windows TerminalGet-AppxPackage *WindowsTerminal* | Remove-AppxPackage#Music appGet-AppxPackage *ZuneMusic* | Remove-AppxPackage#Movies and TVGet-AppxPackage *ZuneVideo* | Remove-AppxPackage#MS OfficeGet-AppxPackage *MicrosoftOfficeHub* | Remove-AppxPackage#People appGet-AppxPackage *People* | Remove-AppxPackage#MapsGet-AppxPackage *WindowsMaps* | Remove-AppxPackage#Help and tipsGet-AppxPackage *GetHelp* | Remove-AppxPackage#Voice RecorderGet-AppxPackage *WindowsSoundRecorder* | Remove-AppxPackage#NotepadGet-AppxPackage *WindowsNotepad* | Remove-AppxPackage#MS PaintGet-AppxPackage *Paint* | Remove-AppxPackage#Sticky NotesGet-AppxPackage *MicrosoftStickyNotes* | Remove-AppxPackage#PowerAutomateGet-AppxPackage *PowerAutomateDesktop* | Remove-AppxPackage#Xbox and related appsGet-AppxPackage *Xbox* | Remove-AppxPackage#Feedback HubGet-AppxPackage *WindowsFeedbackHub* | Remove-AppxPackage#Microsoft To-DoGet-AppxPackage *Todos* | Remove-AppxPackage#CalculatorGet-AppxPackage *WindowsCalculator* | Remove-AppxPackage#Alarms and ClocksGet-AppxPackage *WindowsAlarms* | Remove-AppxPackage#Teams/ChatGet-AppxPackage *Teams* | Remove-AppxPackage#Microsoft EdgeGet-AppxPackage *MicrosoftEdge* | Remove-AppxPackage#Your PhoneGet-AppxPackage *YourPhone* | Remove-AppxPackage#SpotifyGet-AppxPackage *SpotifyAB.SpotifyMusic* | Remove-AppxPackage#Screen & Sketch/Snipping toolGet-AppxPackage *ScreenSketch* | Remove-AppxPackage#Solitaire CollectionGet-AppxPackage *MicrosoftSolitaireCollection* | Remove-AppxPackage#PhotosGet-AppxPackage *Windows.Photos* | Remove-AppxPackage#OneDriveGet-AppxPackage *OneDriveSync* | Remove-AppxPackage#SkypeGet-AppxPackage *SkypeApp* | Remove-AppxPackage#Xbox Console CompanionGet-AppxPackage *GamingApp* | Remove-AppxPackage

Note. An error may occur during Sysprep (check c:\Windows\Panther\setuperr.log):

Error SYSPRP Package <PackageFullName> was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.
Error SYSPRP Failed to remove apps for the current user: 0x80073cf2.

In this case, Sysprep fails after you removing one of the built-in Microsoft Store apps. This is a known Windows 10/11 issue and you can fix it according to the guide.

Generalizing Windows 10/11 Image Using Sysprep

If your computer has a static IP address configured, specify that the address should be obtained automatically (from a DHCP server). You can do that in the network adapter settings.

Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (13)

Or, you can use the following PowerShell script to automatically get an IP address from a DHCP server:

$IPType = "IPv4"$adapter = Get-NetAdapter | ? {$_.Status -eq "up"}$interface = $adapter | Get-NetIPInterface -AddressFamily $IPTypeIf ($interface.Dhcp -eq "Disabled") {If (($interface | Get-NetIPConfiguration).Ipv4DefaultGateway) {$interface | Remove-NetRoute -Confirm:$false}$interface | Set-NetIPInterface -DHCP Enabled$interface | Set-DnsClientServerAddress -ResetServerAddresses}

Now cleanup your image:

  1. Use the Disk Clean-up tool (cleanmgr.exe) to remove junk and unnecessary files from your computer’s hard disk;
    Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (14)
  2. Empty the Recycle Bin;
  3. Remove temporary filesand folders (LocalAppData%\temp, C:\Windows\Temp, etc.);
  4. Before running Sysprep, delete all user profiles, except for the Administrator and Default profiles.

After everything is configured, you can run the Sysprep and select the options:

  • System Cleanup Action: Enter System Out-of-Box Experience (OOBE);
  • Shutdown Options: Shutdown;
  • Check the Generalize option.

Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (15)

After generalizing the Windows image, it will start from Out-of-Box Experience (OOBE) mode and reassign unique SIDs during the first boot.

Using Answer Files with Sysprep for Unattended Windows 10/11 Installation

You can use an answer file together with the System Preparation (Sysprep) tool. It allows configuring unattended Windows Setup settings. This step is optional (used to specify various image deployment options). You can skip this step, and go straight to the step of capturing a Windows image.

The answer file may contain the answer to each question. This must be selected when installing Windows and choosing the initial settings (region, language, product key, keyboard, account, and privacy setting, etc.). Follow the steps during the out-of-box experience (OOBE).

Due to the answer file, the number of installer screens is significantly reduced.

How to Create Windows Answer File Using Windows System Image Manager?

You can create an answer file manually (this is simple XML file). But it’s more convenient to generate the correct answer file using the Windows System Image Manager (SIM) tool. You can do it from the Windows Assessment and Deployment Kit (ADK).

Download the Windows Assessment and Deployment Kit (ADK) for Windows 10 or ADK for Windows 11. Use the ADK version for the Windows version you want to deploy.

Run the adksetup.exe file as an administrator. Then select Deployment Tools to install (it includes the latest version of DISM and Windows System Image Manager).

Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (16)

You will need install.wim file with the Windows image you want to deploy. You can copy the install.wim file from the sources directory on the installation Windows ISO image. If only the install.esd file is available in the sources directory, you can convert ESD to WIM to get install.wim.

Let’s create an answer unattended file for Windows 10 22H1.

Run the Windows System Image Manager with administrator privileges (C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\WSIM\imgmgr.exe). Select File > New Answer File.

Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (17)

SIM will prompt you to specify a Windows image file for which you want to create an answer file. Specify the path to the before installed install.wim file.

Wait for the SIM to mount the Windows installation image and create the catalog file (.clg). This will take some time, after which the install_Windows 10 Pro.clg file will appear in the directory with the install.wim file.

Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (18)

Note. If you try to open the install.wim file of your Windows 10 build using WSIM from an older version of the ADK, you may receive an error message:

Windows SIM was unable to generate a catalog

Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (19)

In order to fix this error, you need to install the latest ADK and WSIM available for your Windows build.

Select your Windows 10 edition. If there is only one edition of Windows in your install.wim file, it will be selected automatically.

Using WSIM, you can configure various parameters for the answer file. For example, you can configure the Windows product key (if you are using KMS serveror MAK keys), time zone, organization and owner info, default language and region settings, input locales, etc.

First of all, we need to do the most important thing: to tell Sysprep to copy all our customizations to the default user profile.

To do this, find the amd64_Microsoft-Windows-Shell-Setup__neutral in the Windows Image section. Right-click on it and select Add Setting to Pass 4 specialize.

Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (20)

Then, in the Answer File panel, expand section 4 Specialize > amd64_Microsoft-Windows-Shell-Setup__neutral. Set the CopyProfile value to TRUE.

Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (21)

Additionally, you can configure the following options in the Answer file.

Pass 1 Windows PE

Choosing an installation language in WinPE:

Microsoft-Windows-International-Core-WinPEInputLocale: en-US;SystemLocale: en-USUILanguage: en-USUserLocale: en-US

The Windows 10 Product key:

Microsoft-Windows-Setup -> UserData -> ProductKey -> Key = {specify your MAK or GVLK key}

To automatically accept user agreement:

Microsoft-Windows-Setup -> UserData -> AccepptEula = True

Pass 7 oobeSystem

Skip Microsoft account creation screen (MSA):

Microsoft-Windows-Shell-Setup –> OOBE -> HideOnlineAccountScreens = True

Do not ask 3 security questions for your local account:

Microsoft-Windows-Shell-Setup –> OOBE -> ProtectYourPC= 3

Create a local administrator account and set a password for it:

Microsoft-Windows-Shell-Setup –> UserAccounts –> LocalAccounts -> Insert New Local AccountName: adminGroup: Administrators

Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (22)

All empty (blank) answer file parameters must be removed.

To check the settings in answer files, select in Tools > Validate Answer File option. If you configured everything correctly, a message should appear in the Messages console: No warning or errors.

Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (23)

Save the answer file by choosing File > Save Answer File As > autounattend.xml.

Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (24)

Now you can close WSIM.

Generalize Windows Image Using Answer File

Now you can use your autounattend file to Sysprep your Windows image. Run the elevated command prompt, and execute the following command (replace the path to autounattend.xml with yours):

c:\windows\System32\Sysprep\sysprep.exe /generalize /oobe /shutdown /unattend:C:\ps\autounattend.xml

Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (25)

Hint. If you want to capture a Windows image running in a virtual machine, you can use the special Sysprep switch /mode:vm:
C:\windows\system32\sysprep\sysprep.exe /generalize /oobe /mode:vm /shutdown /unattend:C:\ps\autounattend.xml
This mode allows you to generalize the OS for deployment on other VMs. Virtual machine mode only works if you are running Sysprep on a Windows running in a virtual machine. Virtual machine mode generalizes a virtual hard disk (VHD) to be deployed as a VHD within the same virtual machine or hypervisor. The hypervisor and hardware profile must be identical to those on which the image was created.

With the /generalize option the Sysprep will remove unique computer data. This allows you to safely deploy this reference Windows 10 image on another workstation or laptop. After executing the command, the computer will shut down.

Capture Reference Windows 10/11 Using DISM after Generalize

After shutting down your computer, you can capture a customized Windows image using MDT. You can also use other special tools for capturing a Windows image or using DISM. Below we will consider the DISM option.

Note. In previous versions of Windows, the ImageX tool could be used to capture and deploy an image. In the latest Windows 10 and 11 builds, you can do all the things with DISM.

Boot the computer with the Windows reference image into Windows PE. You can do this by booting the computer from the Windows 10/11 installation disc, or recovery disc.

Press Shift + F10 on the first setup screen.

In the command window that opens, type Diskpart command. Use the list vol command to identify the drive letters. In our example, the installed Windows image is located on drive D.

To capture the image, run the command:

dism /capture-image /imagefile:E:\win10referenceimg.wim /capturedir:d:\ /name:"Win10 Pro reference image"

Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (26)

  • /Capturedir — the reference Windows folder.
  • /imagefile — the wim image file that we need to create. Connect an additional disk or USB flash drive to the computer and save the image to it (do not specify the Windows partition here);
  • /Compress — use the /compress:maximum option for best WIM image file reduction (this will increase the image capture time, but save a disk space).

Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (27)

Hint. You can capture your reference Windows image and immediately save it to a share network folder on your file server (or MDT host). To do this, you need to mount a network drive in WinPE before running the dism /capture-image command:

  1. Initialize network in WinPE and get IP address from DHCP server:
    wpenit
  2. Map a shared network folder using the net use command:
    Net use E: \\192.168.31.20\share

    Sysprep Windows 10 and 11 Machine: Step by Step Guide – TheITBros (28)

  3. Provide user credentials to access shared folder;
  4. Now you capture image over network to a shared folder.

Copy the reference WIM image to the installation drive media (copy and replace file ..\sources\install.wim), or put it into your deployment software (MDT, SCCM).

SysprepWindows

FAQs

How to Sysprep Windows 10 step by step? ›

To run Sysprep in Windows 10, open Windows Explorer and navigate to C:\Windows\System32\sysprep. You can also just type “sysprep” in the Run command and click “Enter.” In the Sysprep folder, double-click sysprep.exe. In the System Preparation Tool window, click “Generalize”, click “Shutdown”, and then click “OK”.

How do I run Sysprep on Windows 11? ›

Type the command below to change the working directory to “Sysprep” in the command prompt window that appears:cd c:\windows\system32\sysprep. Now, type the command below to run Sysprep in Audit Mode:sysprep /audit. Wait for Windows 11 to shut down. Start the device or VM again, and it will boot into Audit Mode.

How do I run Sysprep step by step? ›

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.

What is the maximum number of times you can Sysprep? ›

Sysprep can only be used up to eight times for a given Windows image. After the eighth time, the user must recreate the Windows image.

What key combination is Sysprep Windows 10? ›

At the OOBE screen, press CTRL+SHIFT+F3. Windows reboots the computer into audit mode, and the System Preparation (Sysprep) Tool appears. The CTRL+SHIFT+F3 keyboard shortcut doesn't bypass all parts of the OOBE process, such as running scripts and applying answer file settings in the oobeSystem configuration pass.

How many times can you run Sysprep on Windows 10? ›

Sysprep can reset Windows Product Activation up to three times.

How do I use OOBE Command Prompt in Windows 11? ›

In Command Prompt, type the OOBE\BYPASSNRO command to bypass network requirements on Windows 11 and press Enter. The computer will restart automatically, and the out-of-box experience (OOBE) will start again.

How do I run a System file checker scan in Windows 11? ›

  1. Click Start.
  2. In the search bar, type CMD .
  3. Right-click CMD.exe and select Run as Administrator.
  4. On the User Account Control (UAC) prompt, click Yes.
  5. In the command prompt window, type SFC /scannow and press Enter .
  6. System file checker utility checks the integrity of Windows system files and repairs them if required.
Jan 3, 2022

Does Sysprep remove Windows license key? ›

Note that running Sysprep does not remove the installed product key and you will not be prompted for a new key during mini-setup.

Where to put the Sysprep answer file? ›

Create an unattend. xml file in the Sysprep directory: Navigate to the following location within your VM: c:\windows\system32\sysprep. Right-click within this folder, and select New > Text Document.

Can I run Sysprep without generalize? ›

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.

What is the Sysprep command? ›

Sysprep (System Preparation) prepares a Windows client or Windows Server installation for imaging. Sysprep can remove PC-specific information from a Windows installation (generalizing) so it can be installed on different PCs.

What happens if you don't generalize Sysprep? ›

Moving or copying a Windows image to a different computer without running sysprep /generalize is not supported. You will want to Shutdown the machine when done (instead of restart). If you restart, the out-of-box experience will run before you have a chance to copy the image.

What happens if you don't run Sysprep? ›

If you don't Sysprep you will end up with machines with the same SID, which is what Windows really uses to identify a machine, not the "pretty" name, DNS name or IP address.

Does Sysprep remove all apps? ›

Sysprep does not remove applications. Some applications are sensitive to sysprep, but those are rare exceptions. Save this answer.

What is Ctrl Shift F2? ›

Ctrl Shift F2 Copy text (JV line item). (PC only) Ctrl Shift F1 Cut text (JV line item).

What does Ctrl Shift F3 do? ›

In Microsoft Word, Ctrl + Shift + F3 pastes all of the contents copied into Spike using the Ctrl + F3 shortcut. Microsoft Word keyboard shortcuts.

How do I start Windows 10 in audit mode? ›

To start Windows in audit mode, press Ctrl + Shift + F3 when the screen gives you a choice of set up or by typing C:\Windows\System32\sysprep\sysprep.exe /audit, at any time, into a command line. To create an answer file you must download Windows ADK.

Do I need to run sysprep before cloning? ›

When you deploy a duplicated or imaged Windows installation, it is required that the System Preparation (Sysprep) tool is used before the capture of the image. Sysprep prepares an installation of Microsoft Windows for duplication, auditing, and customer delivery.

How to sysprep Windows 10 for cloning? ›

How Do You Use Sysprep to Create Generic Windows Images?
  1. Boot your Windows in audit mode. ...
  2. Customize the installation by changing configurations, adding drivers and programs. ...
  3. Run the Sysprep tool by clicking Generalize, Shutdown and OK in the System Preparation Tool window that appeared right after booting in audit mode.
Dec 2, 2020

Can you run sysprep more than 3 times? ›

Because you can reset the activation clock only three times, if you run the Sysprep command multiple times on a computer, you might run out of activation clock resets. We recommend that you use the SkipRearm setting if you plan on running the Sysprep command multiple times on a computer.

How to bypass Windows 11 without Microsoft account? ›

To bypass the internet requirement and use Windows 11 with a local user account, follow these steps:
  1. Start the Window 11 setup.
  2. When you see the Let's connect you to a network screen with the grayed-out Next button, press Shift + F10. ...
  3. Now run the following command at the command prompt: oobe\BypassNRO.
Feb 28, 2023

How to Run system file checker and DISM tool in Windows 11? ›

Type DISM.exe /Online /Cleanup-image /Restorehealth (note the space before each "/"), and then press Enter. (Note: This step may take a few minutes to start and complete.) After you see a message that says "The operation completed successfully," type sfc /scannow (note the space between "sfc" and "/") and press Enter.

How to bypass Microsoft account when setting up new computer? ›

  1. crmaris says: March 17, 2023 at 2:37 pm. Open the Settings app, then go to the Accounts section. Click Your info, then choose Sign in with a local account instead. Confirm that you want to sign out of your Microsoft account and verify your identity. ...
  2. JimCKD says: March 17, 2023 at 5:31 pm. Aris way is the best. Reply.
Dec 15, 2022

What is the DISM command for Windows 11? ›

You can execute DISM /Online /Cleanup-Image /RestoreHealth or DISM.exe /Online /Cleanup-Image /Restorehealth on your Windows 11 computer to scan the running operating system for corrupt or missing system files and then attempt to fix them.

How to repair corrupt files Windows 11 using CMD? ›

To repair Windows 11 using CMD, you will first need to open the Command Prompt by searching for it in the start menu. Once open, type in the following command and hit enter: sfc /scannow. This will scan your system for any corrupt files and attempt to fix them.

Should I run DISM or SFC first? ›

Run SFC first, and only if SFC finds a problem is it necessary to run DISM. Run SFC first, and — no matter what SFC reports — you might as well run DISM after that.

Does Sysprep remove local admin? ›

If you are talking about the local "Administrator" account it cannot be removed. It can only be enabled or disabled. For example if you are in audit mode for sysprep, its enabled and uses that account to log you on so you can make changes to the machine in audit mode.

Is Windows license key stored in BIOS? ›

The key for the version of Windows the PC comes with, is stored in the computer's UEFI firmware or BIOS. You don't even need to know it — assuming you're installing the same edition of Windows the PC came with, it should automatically activate and work without you needing to enter a key. It'll all happen automatically.

Does Sysprep remove static IP address? ›

Network settings, such as custom network connection names, static IP addresses, and DHCP Class ID settings, will not be carried over with SYSPREP installs.

What is the answer file in Windows SIM? ›

An answer file is an XML-based file that contains setting definitions and values to use during Windows Setup. In an answer file, you specify various setup options. These options include how to partition disks, where to find the Windows image that will be installed, and which product key to apply.

Does Sysprep remove user profiles? ›

Sysprep doesn't remove users account. It is recommanded to customize the Windows using the default local administrator.

How do I create an unattended installation answer file? ›

Create and modify an answer file
  1. Start Windows System Image Manager.
  2. Click File > Select Windows Image.
  3. In Select a Windows Image, browse to and select the image file (D:\install. wim). Next, select an edition of Windows, for example, Windows 10 Pro, and click OK. Click Yes to create the catalog file.
May 18, 2022

What is the alternative to Sysprep? ›

Compared with Sysprep, AOMEI Image Deployment is very easy to operate. You just need to follow the steps above and click the corresponding button. If you have many computers, AOMEI Image Deployment is suitable for you. If you only have one or two computers, you can try AOMEI Backupper Standard.

How long does Sysprep usually take? ›

Provisioning - Slow SYSPREP and First Logon. Experiencing issues when running SysPrep that it takes a long time or when Windows 10 loads for the first time it takes 20-60 minutes to come up to the login screen.

What to do after Sysprep? ›

After Sysprep prepares the image, the reference device will shut down. The next time the device boots, it will boot into OOBE. Don't power the reference IoT device back on until you're ready to capture an image. If the device boots, you'll have to go through the Sysprep process again.

How do I run Sysprep after cloning? ›

9 Replies
  1. Clone the machine.
  2. Disable the nic on the clone.
  3. Boot up, log in, leave domain, reboot.
  4. Log in, change name, reboot.
  5. shut guest down and enable NIC (beware duplicate IP's!) ...
  6. Shut down and start in correct network.
  7. You can now join the domain for testing.
Jan 25, 2021

What happens after Sysprep? ›

After generalizing the image using Sysprep, the reference device will shut down. Next time your start the device, it will boot into OOBE. 📢Note: Don't power the reference computer on until you are ready to capture an image.

Does Sysprep remove domain membership? ›

* Sysprep runs only if the computer is a member of a workgroup, not a domain. If the computer is joined to a domain, Sysprep removes the computer from the domain.

What happens if you Sysprep a domain controller? ›

The /generalize option instructs Sysprep to remove system-specific data from the Windows installation. System-specific information includes event logs, unique security IDs (SIDs), and other unique information. and: If the computer is joined to a domain, Sysprep removes the computer from the domain.

Can you capture image without Sysprep? ›

You can capture a machine without sysprepping, that could work just fine on a physical machine, where you might want to take that image, and put it back on the exact machine to continue upgrading at some later time.

How many times can you Sysprep Windows 11? ›

This allows them to run the installation processes in an unattended mode. It can reset the Windows Product Activation. IT teams can leverage Sysprep to reset Windows Product Activation up to three times.

What is the max Sysprep? ›

If a single computer has multiple operating systems, you must run Sysprep on each operating system individually.
...
Limits on how many times you can run Sysprep.
Operating System VersionSysprep Count Limit
Windows 8.1 and Windows Server 2012 or later1001
Windows 7 and Windows Server 2008 R23
Windows Server 20083
Dec 15, 2021

How to build a Windows 10 image using Sysprep? ›

How to deploy Windows 10 image to multiple computers without SID:
  1. First, press Win + R and enter "sysprep" in the textbox to find Sysprep.exe. ...
  2. Click OK and the computer will shutdown automatically. ...
  3. Then you can go to Tools tab, choose Image Deploy Tool to deploy the system image you just created.
Oct 18, 2022

What does Sysprep actually do? ›

Sysprep (System Preparation) prepares a Windows client or Windows Server installation for imaging. Sysprep can remove PC-specific information from a Windows installation (generalizing) so it can be installed on different PCs.

How to create Windows 10 ISO image from existing installation? ›

In the tool, select Create installation media (USB flash drive, DVD, or ISO) for another PC > Next. Select the language, architecture, and edition of Windows, you need and select Next. Select ISO file > Next, and the tool will create your ISO file for you.

Does sysprep remove installed software? ›

Removes system-specific data from Windows. Sysprep can remove all system-specific information from an installed Windows image, including the computer security identifier (SID). The Windows installation can then be captured and installed throughout an organization. Configures Windows to boot to Audit mode.

How do I create an answer file in Windows 10? ›

Create and modify an answer file
  1. Start Windows System Image Manager.
  2. Click File > Select Windows Image.
  3. In Select a Windows Image, browse to and select the image file (D:\install. wim). Next, select an edition of Windows, for example, Windows 10 Pro, and click OK. Click Yes to create the catalog file.
May 18, 2022

How do I create a Sysprep file? ›

Create an unattend. xml file in the Sysprep directory: Navigate to the following location within your VM: c:\windows\system32\sysprep. Right-click within this folder, and select New > Text Document.

What is the difference between Sysprep and clone prep? ›

ClonePrep is only available for instant clones. Microsoft Sysprep is a tool to deploy the configured operation system installation from a base image. The desktop can then be customized based on an answer script. Sysprep can be used for all types of clones - linked clones, instant clones, and full clones.

What do I do after Sysprep? ›

After Sysprep prepares the image, the reference device will shut down. The next time the device boots, it will boot into OOBE. Don't power the reference IoT device back on until you're ready to capture an image. If the device boots, you'll have to go through the Sysprep process again.

Where is Sysprep image stored? ›

Sysprep.exe is included with Windows Server 2019 and is located in the C:\Windows\System32\Sysprep folder. When you use Sysprep.exe to prepare the image, you can configure the image to return to the system Out-of-Box Experience (OOBE), as shown in Figure 3-7.

Top Articles
Latest Posts
Article information

Author: Corie Satterfield

Last Updated: 27/01/2024

Views: 5734

Rating: 4.1 / 5 (62 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Corie Satterfield

Birthday: 1992-08-19

Address: 850 Benjamin Bridge, Dickinsonchester, CO 68572-0542

Phone: +26813599986666

Job: Sales Manager

Hobby: Table tennis, Soapmaking, Flower arranging, amateur radio, Rock climbing, scrapbook, Horseback riding

Introduction: My name is Corie Satterfield, I am a fancy, perfect, spotless, quaint, fantastic, funny, lucky person who loves writing and wants to share my knowledge and understanding with you.