sysprep windows 10 machine

Sysprep Windows 10 Machine: Step by Step Guide

In this article we will show you how to use PowerShell and Windows System Preparation Tool to prepare a highly customized, personal Windows 10 install image. Before starting the installation, we need to make sure that our computer or virtual machine is not connected to network, because Windows 10 sysprep process will later fail if the PC was connected to Internet during the installation.

What is Sysprep?

Let me remind you, that the Sysprep.exe utility is used to prepare the reference image and its depersonalization. Sysprep allows you to delete all information related to a specific operating system, including unique identifiers (SID, GUID, etc.), resets the activation of the computer.

Everything configured in the operating system before (installed software, shortcuts on the desktop, system settings for personalization, network, File Explorer, installed and pinned on the start screen Metro apps and other parameters) will remain untouched.

In Windows 10 and Windows Server 2016, the Sysprep.exe utility is located in folder C:\Windows\System32\sysprep directory.

sysprep windows 10 file

Using the Sysprep utility greatly simplifies the installation and configuration of the operating system in a large company. Once prepared standard Windows 10 image installed and configured in the right way, the operating system (with a certain installed software, with the system settings, with the specified rights and restrictions) deployed to all computers of the company using MDT, WDS (take a look at Deploying Windows 10 with MDT and WDS), SCCM or manually.

Sysprep Windows 10 Guide

You need to notice that we are using Build 1607 (Anniversary Update ) of Windows 10, so maybe this bug will be fixed in later builds. Let’s start to sysprep Windows 10.

Step 1 – Boot to Windows 10 Audit Mode

Start Windows installation normally. After reboot or two Windows is installed and process stops waiting your input. At this point we need to click on the Use express settings button. On next dialog you should not type a username, so don’t enter it (this stage of OS setup has a name OOBE out-of-box experience for the end user).

audit mode windows 10

Instead, press and hold down the CTRL+SHIFT+F3 keys combination. OS will now reboot to a special customization mode, the Windows 10 Audit Mode.

As no user profiles exist yet, Windows will use its built-in administrator account to sign in to Audit Mode. There is only one visible sign to mark that you have entered the Windows 10 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. Just fold it.

Until now the installation was done without a network connection. So, you can connect your PC to network and Internet now.

Step 2 – Download and Install the Windows 10 ADK

What we are going to do next is to download and install the Windows 10 Assessment and Deployment Kit (ADK). First of all we need to install the Windows System Image Manager (WSIM), a part of the Windows ADK. You can download it from the links below:

Home link
Direct Link

windows 10 adk download

Once it is downloaded, run the installation file. Here you don’t need to change the location, so click on Next. After that accept the license agreement and go ahead.

Now you need to select the features you want to install. In our case, we just need to install only WSIM, so put the mark only on Deployment Tools and click on Install.

windows 10 deployment tools

Step 3 – Install OEM information and logo

It’s very easy to install OEM information and logo. You just need to create the .reg file and put information that you want. In our case we put in the following content:

Windows Registry Editor Version 5.00

“Manufacturer”=”TheITBros, LLC”
“Model”=”Windows 10 Pro Image 10-1-2015”
“SupportHours”=”9am to 5pm ET M-F”

Now, you need to create the oem folder in C:\Windows and put there your logo. Once it is done, just open up the .reg file that we have created earlier and it will automatically add it to the registry.

oem reg file

sysprep windows 10

Step 4 – Begin customization in Windows 10 Audit Mode

After entering the audit mode, you can start installing, updating applications and configuring the operating system settings. All these apps and settings would be present in the default user profile. Default profile is used as base profile when you later create users on your Windows PC.

To install default all user apps we will use PackageManagement (aka OneGet), an integrated module of PowerShell. We cannot just go to the Start Menu and to the Search, because they are disabled in Windows 10 Audit Mode. So, we need to start PowerShell manually by browsing deep into Windows folder and starting it from there.

Go to C:\Windows\syswow64\WindowsPowerShell\v1.0 and then run powershell_ise application.

powershell ise

First thing we need to do is extend our rights to run scripts, in order to be able to install software from a package provider later on.

All we need is just type Set-Executionpolicy Unrestricted command.

Now we need to use the package manager or provider. The package manager we will use now is called Chocolatey. It needs unrestricted script execution policy, which is why we set it first thing after the PowerShell had started.
To add a provider we need to type Get-Packageprovider Chocolatey command.

windows 10 powershell sysprep

Step 5 – Install the software you need

To install all the software that we need, we just have to use the Install-Package script.

. Let’s say we want to install Opera, Google Chrome, VLC, Adobe Reader, 7Zip, K-Lite Codec Pack Full and Zoomit.

To do it, you need to type command

Find-Package -Name Opera, GoogleChrome, VLC, AdobeReader, 7Zip, Zoomit. k-litecodecpackfull | Install-Package

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

Step 6  – Disable Telemetry and Data Collection in Windows 10

The Windows 10 collects information about the operation of users on the computer. Examples of handwriting and voice samples, location information, error reports, calendar contents – all this can be sent to Microsoft servers

If you do not want your OS to automatically send data to MSFT servers, you can disable the Telemetry and Data Collection.

Run the elevated command prompt and execute the following commands:

sc delete DiagTrack

sc config DcpSvc start=disabled

echo "" > C:\ProgramData\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl

reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v 

AllowTelemetry /t REG_DWORD /d 0 /f

sc delete dmwappushservice

Also you can disable Window 10 tracking using DisableWinTracking tool from GitHub.

Step 7  – Installing Windows Update in Audit mode

Starting with Windows 8.1, in the auditing mode, you cannot install updates using the Windows Update Center in Settings panel.

The Windows Update Center checks to see if the system has completed the OOBE stage (from which you are logged in). If not, the update is not performed.

To automatically update the system from the console, you can take on a very handy PowerShell module the PSWindowsUpdate Module from TechNet.

Save the archive to a USB drive and (this is important!) right click on it -> Properties -> Unlock.

Create file PSWindowsUpdate.cmd on the USB drive with one command:

PowerShell -ExecutionPolicy RemoteSigned -Command Import-Module PSWindowsUpdate; Get-WUInstall -AcceptAll -IgnoreReboot

Unpack the to the folder: C:\Windows\System32\WindowsPowerShell\v1.0\Modules.

Run PSWindowsUpdate.cmd as administrator.

That’s all! Available updates will be downloaded and installed automatically.

When the update is complete, you can delete the module that was previously copied to the Windows folder.

Step 8 – Uninstall built-in apps

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

Paste the following scripts onto the PowerShell command line and press Enter.

Get-AppxPackage *3dbuilder* | Remove-AppxPackage
 Get-AppxPackage *windowsalarms* | Remove-AppxPackage
 Get-AppxPackage *Appconnector* | Remove-AppxPackage
 Get-AppxPackage *windowscalculator* | Remove-AppxPackage
 Get-AppxPackage *windowscommunicationsapps* | Remove-AppxPackage
 Get-AppxPackage *windowscamera* | Remove-AppxPackage
 Get-AppxPackage *CandyCrushSaga* | Remove-AppxPackage
 Get-AppxPackage *officehub* | Remove-AppxPackage
 Get-AppxPackage *skypeapp* | Remove-AppxPackage
 Get-AppxPackage *getstarted* | Remove-AppxPackage
 Get-AppxPackage *zunemusic* | Remove-AppxPackage
 Get-AppxPackage *windowsmaps* | Remove-AppxPackage
 Get-AppxPackage *Messaging* | Remove-AppxPackage
 Get-AppxPackage *solitairecollection* | Remove-AppxPackage
 Get-AppxPackage *ConnectivityStore* | Remove-AppxPackage
 Get-AppxPackage *bingfinance* | Remove-AppxPackage
 Get-AppxPackage *zunevideo* | Remove-AppxPackage
 Get-AppxPackage *bingnews* | Remove-AppxPackage
 Get-AppxPackage *onenote* | Remove-AppxPackage
 Get-AppxPackage *people* | Remove-AppxPackage
 Get-AppxPackage *CommsPhone* | Remove-AppxPackage
 Get-AppxPackage *windowsphone* | Remove-AppxPackage
 Get-AppxPackage *photos* | Remove-AppxPackage
 Get-AppxPackage *WindowsScan* | Remove-AppxPackage
 Get-AppxPackage *bingsports* | Remove-AppxPackage
 Get-AppxPackage *windowsstore* | Remove-AppxPackage
 Get-AppxPackage *Office.Sway* | Remove-AppxPackage
 Get-AppxPackage *Twitter* | Remove-AppxPackage
 Get-AppxPackage *soundrecorder* | Remove-AppxPackage
 Get-AppxPackage *bingweather* | Remove-AppxPackage
 Get-AppxPackage *xboxapp* | Remove-AppxPackage
 Get-AppxPackage *XboxOneSmartGlass* | Remove-AppxPackage

Step 9 – Create Windows 10 Sysprep Answer file

Now we need to create an Answer File. An answer file is a set of instructions in an XML file. When sysprep is run, it reads these instructions, what changes it should make to the Windows image.

At first we need to create a catalog file. For that we need the install.wim file from a Windows install disk or ISO file.

Note. Windows 10 Build 9926 install.wim file for some reason cannot be used for the catalog file. This will be fixed in future builds, for sure. But for now we have a workaround.

To get an answer file for our Build 9926, at first we have to create the catalog using Windows 8.1 or Windows 10 Builds 9841, 9860 or 9879 install.wim file, and later edit the answer file.

Find the install.wim on any install media for above mentioned Windows versions and copy to the desktop of the PC you are using for this process now.

The install.wim can be found in Sources folder in any Windows install media. We are using the install.wim from Windows 8.1 Update 1.

Open Windows System Image Manager.

Location of the Windows System Image Manager is:

C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Deployment Tools\WSIM\imgmgr.exe

windows 10 sysprep answer file

Now, create a new answer file, and select the install.wim we just copied to the desktop.

Creating the catalog will take quite a long time.

windows 10 catalog file

Once it is done, we need to do the most important thing, set the CopyProfile value to TRUE. This setting is telling Sysprep to copy all our customizations to default user profile.

sysprep windows 10 copy profile

Once it is done, let the Windows SIM validate your answer file and check it for errors. Click on Tools -> Validate.

In our case it is nothing to be worried about, only warnings about some deprecated settings no longer possible to change, and notices that because we did not change some settings, they will be left out.

Now, we can save the answer file and name it as we want to. But the file extension must always be .xml. Save the answer file to root of any drive other than C:.

messages sysprep

After that you can delete the install.wim and catalog files from the desktop.

Because the install.wim file that we have used is not belonging to the version of Windows we will Sysprep, the answer file must be edited. So, open it in Notepad.

Change the path to your Windows 10 install.wim file at the bottom of the answer file. In our case we need to change drive and Windows version to Windows 10 Pro. Now, save this file as CustomImage.xml on the drive D:.

custom image

Step 10 – Run Sysprep in Windows 10

Finally let’s run sysprep. Open up Command Prompt as admin.

Go to Sysprep folder and type in the following command:

Sysprep.exe /generalize /oobe /shutdown /unattend:D:\CustomImage.xml

In our case the answer file is on the root of the drive D:. Change the command according to where your answer file is located.

sysprep cmd

Sysprep will apply you answer file and shutdown the computer. Now this image is ready to be imaged using your choice of imaging software.

When the computer has booted to imaging and recovery tool, create a system image according to instructions for the program you are using. Once it is done, shutdown the computer.

You have created a generalized, highly customized Windows install image which can be restored to any computer instead of installing. Restoring takes only half of the time needed for installation.

Start PC normally to finalize the installation.

The Welcome phase first boot is a bit different in a Sysprepped Windows. You will be asked to enter the product key. This is of course not necessary, you can skip it.

enter product key

Now, create a local account. You can later change it to a Microsoft Account.

Finally, we did it. After installation you will see that all customizations are there, all software you installed in Audit Mode are there as well.

That’s all. If you have any questions about this Sysprep Windows 10 tutorial, you are free to leave them in the comments section below.

You may also like:

Sysprep a Windows 7 Machine – Start to Finis... This is the old version, please see the new Sysprep a Windows 7 Machine – Start to Finish V2. Note - I highly recommend creating a boot or rescue d...
WinPE 3.1 Scripts WinPE 3.1 Scripts This latest version was compiled on September 27th, 2012. This is the third update to our WinPE scripts. Please read our tutorial o...
Copy Taskbar Icons Windows 7 Sysprep This is the old version, please see the new Copy Taskbar Icons Windows 7 Sysprep v2. Ok, you can thank a colleague of mine (Dinyero Johnson) for th...
How to Convert ESD to WIM File on Windows 10 In this tutorial we will show you how to convert ESD to WIM file using Command Prompt. ESD file is a new thing within Windows 10 OS, that Microsoft is...
Sysprep Windows 7 – Third Party Anti-Virus I have run into about 20-30 people over the last couple weeks that were having trouble sysprepping and they all narrowed it down to the same thing; th...
  • Joe L

    Hello, need some help here please. I have setup a win 10 64-bit computer with all latest ms updates, device drivers, and applications. I have enabled local hidden admin, created two other local admins as well. I have activated Windows 10 already since we have VL licensing. After re-imaging, I would for it to only prompt user for computer name. We will add to our domain manually for now. We create disk image using symantec ghost to deploy to similar model desktops/laptops with UEFI bios. With this info, what passes and settings do I use on my unattended file. Your advise would truely be appreciated, I will donate as well as your articles are very useful.

  • David_Levine

    Thanks for this great article! But, there is a problem with the CTRL-SHIFT-F3 reference, it doesn’t work at the Windows 10 user account creation screen as mentioned above. It DOES work at the Settings screen though.

    • DJMankiwitz

      I’m also trying to figure this out. I set up the image as a single partition on the drive initially for simplicity, and here it’s suddenly telling me I was supposed to have an extra partition as drive d where this is all stored. Some explanation would be most helpful here.

      • Eugene Wolffe

        I have been working on doing this for quite some time now, and I think I have this question sorted. From what I can see, the unattend.xml WOULD need to be a the root of some other drive IF you were using it for installing windows from the beginning e.g. partitioning the hard disk. In this case of course you would need it on a different volume and of course you would need access to install.wim. However, if windows is already installed and in Audit Mode, you can simply place your unattend.xml or whatever it is named somewhere on the windows partition (beware it may contain passwords obfuscated or not) in a system folder and run sysprep with “/unattend:C:pathtoyourunattend.xml” as a flag. Because sysprep copies the unattend to C:WindowsPantherunattend.xml where windows looks for it during the generalize phase anyway, it doesn’t matter where it is, because windows will find it and run it from there. Hope this helps!

  • Piotr Smalira

    How can I upgrade my customized image to Windows 10 1607? Is it possible?

    • Christian H

      I completely upgraded my PC to 1607. Did a reset and am syspreping the image off of that. Seems to be working so far

  • Ryan McKenzie

    Do I need to create a profile other than the built in admin? I can’t get internet access using that one…

    • Ryan McKenzie

      I’m new I don’t know what to do! lol

  • Jon P

    Thank you very much for this write-up. It is working great.

    However, I have one question…I was just about done, but decided to shut down the PC and do a Ghost Image before running Sysprep. Now after booting back up, I’m unable to get back into Audit Mode. Just tells me that the Administrator account is disabled.

  • Rob H

    “The system will now shutdown and is ready to be imaged using your choice of imaging software.

    When the computer has booted to imaging and recovery tool, create a system image according to instructions for the program you are using. Once it is done, shutdown the computer.”

    Any chance you can expand on this? This is actually the info I came here to find! 🙁

  • PaulEDangerously

    Is there no longer a way of enabling the local Administrator account through the answer file (as you had explained in the Windows 7 version of this article)?

    • Amy Hardeman

      You can add a SetupComplete.cmd script by creating a Scripts folder in the directory windowssetup. Your script would be: net user administrator /ACTIVE:YES. If you already have a Setupcomplete.cmd file already, just add this to it. It worked for me.

  • Mike K

    The article is great. I have two burning question. I already have a Windows 10 Ent. x64 computer already built with all our software and drivers installed. Can I just sysprep it? Do I need to build it in audit mode before sysprepping?

  • Mike Soultanian

    So has anyone encountered the recent sysprep errors which I believe are due to the Creators Update? When you run sysprep it fails with “A fatal error occurred while trying to sysprep the machine” and errors in the logs relate to something like “Error SYSPRP Package was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.”

    There seem to be a bunch of hacks, but I haven’t found anything totally foolproof – anyone have any more insight on this as it’s really problematic if we can’t sysprep our machines!!

  • frankwick

    I do NOT recommend uninstalling the built-in apps. My suggestion is leave them as-is. Here’s why:

    1) Leisure apps are actually ok in business:
    You may think that removing Candy Crush or Netflix is doing your company a favor, but if an employee is spending too much time gaming, that’s really a managerial problem, not IT. We travel a lot in my company and Netflix is used on planes – I’m sure someone has played Candy Crush as well.

    2) Removing apps may break something unrelated:
    For example, if you remove the People app, then you break MyPeople or potentially any other app with sharing built in. Another example: MS Paint has a link to Paint 3D. You will break that link if you pull Paint 3D.

    3) By pulling apps, are you going to break a future upgrade?
    IT is famous for customizing stuff and causing problems later. I saw one person suggest that the Photos app be removed because it was too basic. The alternative photo viewer was Paint! Who in their right mind wants to view photos in Paint? Besides, Pain will be removed from the next version of Win10.

    Keep the apps.