How to run Sysprep on Windows 10

Sysprep has been the go-to utility for a long time for preparing Windows images for deployment. When I was lead author of the team that wrote the Windows 7 Resource Kit for Microsoft Press, we made sure that we devoted almost a quarter of our almost 1,800 page book to the topic of creating, preparing, deploying, and maintaining Windows images using such tools as the built-in Sysprep.exe utility, the Microsoft Deployment Toolkit (MDT), and the Windows Deployment Services role of the Windows Server platform. One of the tools we focused on, of course, was Sysprep.exe, a command-line tool that has been provided by Microsoft every 32- and 64-bit version of Windows starting with Windows NT 4.0 Workstation and Server.

Sysprep stands for System Preparation Tool and its original purpose was to “generalize” a Windows installation by removing installation-specific information from it like the computer’s name and its unique security identifier (SID). By removing these items the Windows installation could then be “cloned” (duplicated) to another computer after which a new and unique name and SID would be generated so that the cloned computer could co-exist on the same network as the computer where the cloning operation had been performed.

Over the years, as new versions of Windows were released by Microsoft, the Sysprep utility was enhanced with new command-line options that provided various different capabilities. For example, in Windows 7 you could use Sysprep to remove computer-specific and operating system-specific installation data from Windows 7, configure Windows 7 to boot in audit mode, configure Windows 7 to boot to the Windows Welcome screen, or reset Windows Product Activation (WPA) on the system up to three times. Unlike Windows XP and earlier versions of Windows where the Sysprep utility was provided separately on the installation media, Sysprep in Windows Vista and Windows 7 is a native (built-in) tool found in the %WinDir%\System32\Sysprep directory on all installations.

On the face of it, Sysprep in Windows 10 is the same utility found in Windows 7 installations, so if you’re already familiar with how to use it in Windows 7 then you can utilize it the same way in Windows 10. Well, not quite, as we’ll see in a moment. But most of our readers have been in IT for a while and you’re very likely familiar with using Sysprep from deploying earlier versions of Windows. If it’s been a while since you’ve used it you can get a quick refresher by reading my old article “Deploying Vista — Part 5: Using Sysprep,” which I wrote a decade ago for, one of our old TechGenix sites that have been incorporated into our new TechGenix site. And a quick look at the Sysprep Command-Line Options on Microsoft TechNet makes it plain that the Sysprep utility in Windows 10 is basically the same as in Windows 7.

Ask the experts

sysprepBut not quite. I asked a few deployment experts whether there is anything different when using Sysprep on Windows 10 compared with using it on previous versions of Windows, and also whether there any gotchas or things one should be aware of when using Sysprep in Windows 10 to prepare an image for deployment. The answers I received from them were quite enlightening. The first individual I contacted was Mikael Nystrom, who works for TrueSec AB in Sweden. Mikael works as a consultant, trainer, and speaker at conferences in the areas of his expertise, which especially include OS deployment, system management, and virtualization. Mikael has also been repeatedly awarded the Microsoft Most Valuable Professional (MVP) award beginning in 2006 with an award in the area of Setup/Deployment. (I received the same award myself a year later in 2007 but consider Mikael light-years ahead of me in this subject area.) Mikael responded to my questions like this:

“Yes, and no, it is still the same process, but there is one big ‘whoops’ here: Sysprep will fail if the modern applications had been updated, and yes, they will fail if the machine has access to the Internet. So the trick is to make sure it does not have access or to block it. There are basically two ways to block that from happening, either by blocking network access (using proxy, firewall, or by configuring the Windows Firewall during deployment to block it) or by modifying a policy before the virtual machine is booted, which is a bit tricky but is a great way to fix this.”

For those who aren’t aware, the term “modern app” refers to applications that Windows 10 users install from the Windows Store a.k.a. the Microsoft Store. For a good explanation of modern apps see this MSDN Magazine article from 2015. And for a discussion of problems associated with the Windows Store see this Windows Insider article from an issue last year of Redmond Magazine.

The other expert I pinged to get some thoughts on this matter was Keith Garner, who formerly worked at Microsoft on the Deployment Toolkit as a developer, technical program manager, and subject matter expert. Keith now works as a consultant and he has a blog named Keith’s Consulting Blog with the catchy subtitle of “Getting the world ready, one machine at a time.” Like Mikael, Keith is one of the big names in the deployment field and his response to my inquiry was similar to Mikael’s:

sysprep“Windows 10 Sysprep performs a lot of functions to generalize a machine for use on other machines, including cleaning up the new Windows Store applications. Be aware, however, that sometimes Sysprep doesn’t always do a good job at cleaning these apps, so you may need to uninstall them or disable them all together before running Sysprep.”

Keith also pointed me to an article by Johan Arwidmark (another deployment expert) that explains why Sysprep sometimes fails in Windows 10 due to Windows Store updates and how this can be fixed. As you can see from this article, the problem is complex but can be resolved fairly easily if you build your Windows 10 reference images in a virtual machine environment and can deny access to the Internet during the image-building process. If this is not the case, however, you can try using Johan’s script on GitHub to fix any problems that arise from sysprepping a Windows installation that has modern apps installed on it.

A better Sysprep?

Some things always seem to break and come apart when Microsoft releases a new version of Windows. Sysprep mostly works on Windows 10, but certain scenarios can cause things to break. One wonders with the whole Windows as a Service initiative if there isn’t some better way of deploying Windows 10 than the approach used with earlier versions of Windows. It turns out that Windows deployment is evolving in some different directions, but I’ll leave that for a later article I’ll be writing soon here on TechGenix.

Leave a Comment

Your email address will not be published.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top