Automate Windows 10 In-Place Upgrades From the Command Line

I recently had a scenario with a client that had no Configuration Manager infrastructure, used Intune to manage workstations, had trouble configuring MDT to support Windows 10 upgrades (there are still several known issues with MDT & Windows 10), but still needed to automate deployment of Windows 10 to end users.

Since the Windows 10 in-place upgrade preserves all files, settings, and drivers, it’s actually pretty easy to script several settings into one line with the available setup switches. Here’s a list of all available command line switches using the Windows 10 setup. ***Updated for Windows 10 1803 – New BitLocker Setup Commands Available!***

The first step is to copy all of the files from your Windows 10 media to a local or network location. Easy enough.


Next, create a batch file that is one folder up from this location. Mine is organized like this:


Now, edit the batch file and add a line of code to customize your Windows 10 upgrade. I used the following switches:

start /wait .\Win10\setup.exe /auto upgrade /migratedrivers all /dynamicupdate enable /showoobe none /pkey XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

Once launched, the wizard can be completely automated if you use the proper switches.


If you want to deploy this to users, you have a few options. You don’t need to copy all of the setup files to their systems if you have a network drive that they can access. Users have the option to run this command directly from the network location, and then all of the required files for the in-place upgrade will be staged on their local system. You could also deploy a shortcut to a CMD file with the setup parameters to your users’ desktops using group policy.