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.




Hi Josh, this is brilliant thank you for sharing this :)
I have modified your script slightly, I copied the Win10 setup files to a network share, and changed the script to point at the share, I then deployed the .cmd to a few Users desktops, I got them to run the .cmd and it runs perfectly, an hour later they have windows 10 :-D
Glad to hear it worked! Microsoft really added some great functionality with the Windows 10 setup.
Craig how did you setup the path to point to a network share
Hi Josh,
Is there a way to automate and have “Keep personal Files only” selected from the command line. I would like to be a silent installation where users have no interaction with the installation process.
thanks
Jando
Thank you Josh.
I have first tried to use SCCM 2012 R2 to do an In-Place upgrade from Windows 7 and found that sciprintg solution was much better in our case. After I spent hours of implantation of SCCM it failed to push clients because we already have Intune on our domain workstations.
Again, thank you for sharing this solution with the rest of us.
Nick
Glad it was helpful! Thanks
Can this be used to upgrade to Windows 10 Pro without a key? I am trying to find a way to automate the Free Upgrade from Microsoft.
If you already have registered and valid version of Windows 7 or 8 then you don’t need any keys. It will upgrade for you automatically.
Collby did you find some other solution for deployment.
I m in the situation to decide which solution is easier.
I’m trying it on free upgrade with a row like this: E:\Win10Upgrade\ESDISO\setup.exe /auto upgrade /migratedrivers all /dynamicupdate disable /showoobe none
At the moment it’s working (25% has installed)
And it worked, client got windows 10 without any klicks :)
Yay, glad I found your post. Saved me a lot of time looking around. Hope it all works smoothly.
hello Josh,
i need to add this package to a deployment software and deploy it to users desktops, what should i do in order to avoid any action from end users. i mean that when the package is deployed, upgrade process starts automatically without any actions.
Yasmeen,
The command line argument specified above should be a zero-interaction deployment method, meaning that no input is required from users.
Hi,
wonderful script to deploy it on hundred PC’s with a batch scheduled during night hours.
But when it launched there is a warning about the language applied.
So with this parameter /Compat IgnoreWarning there is no problem.
Thanks for sharing! Were you deploying the anniversary update?
I’m curious how anyone pushed this script through SCCM 2012 R2? I made a powershell script that I put into a task sequence command line in SCCM that robo copies a zipped folder of the ISO contents of Win 10 and then the install.cmd after everything gets copied to a user’s machine (using a test machine HP Zbook 15 G3) it launches the INSTALL.cmd
Which I have it set up this way
start /wait C:/Windows10upgrade\setup.exe /auto upgrade /migratedrivers all /dynamicupdate enable /showoobe none /pkey XXXX
The problem doing this througha task sequence in SCCM is it starts, i see it copying over the files, it launches the INSTALL.CMD, then restarts to work on updates, but while loading files, it reverts back to WIN 7 and once I am back on WIn 7 I get error 0x80070003-0x2000C Installation failed in Safe_OS phase with an errur during apply_image operation . What’s nerve racking is when I run the power shell script for this in the command prompt window locally on that HP machine it works. Any idea what is happening or the best way to deploy this through SCCM?
wonderful points altogether, you simply gained a emblem new reader. What might you suggest about your submit that you just made a few days in the past? Any certain?
You lost me, friend. I mean, I assume I get what youre declaring. I have an understanding of what you’re saying, but you just appear to have ignored that you’ll find some other people inside the world who view this issue for what it really is and may well not agree with you. You may perhaps be turning away many of individuals who might have been lovers of your web log.
Patrickj ai toujours aimé vos commentaires micro.je suis athlète FFA pratiquant et nageur FFN depuis plusieurs années .j ‘apprécie maintenant vos commentaires écrits avec beaucoup de recul et d ‘analyse.
That’s a clever answer to a tricky question
I don't like to drive through fog, but I enjoy using it as a tool for photography. You have done well, I like the subtle reflections on the buoys and water.
Can this be modified to perform a Windows 10 Feature Upgrade from , say, Anniversary to Creator’s?
I’m looking to use the ISO to migrate a client whose systems may be stuck on 1511, or 1607. They don’t have SCCM or WSUS because we have a third-party patching solution.
Yes, you can definitely perform that upgrade with the latest media without the use of MDT or SCCM. As far as I know, this is still the latest list of command line options with Windows 10 media setup: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-command-line-options
how do you select which windows edition to install for a wim file that includes multiple editions , line enterprise, professinoal ,…
and there is also a switch /imageindex 3 that can be used for force the edition
Nice, thanks for sharing!
Hello
How to specify which windows edition must be install via command line?
the new windows 10 1709 has multiple edition in it, enterprise, pro, education,… adn I want to install ENT.
thanks
I found the answer to my question here:
https://www.askvg.com/fix-cant-select-windows-10-pro-edition-during-clean-installation/
I keep getting “Setup has failed to validate the product key”.
My script is the following:
start /wait .\Win10\setup.exe /auto upgrade /migratedrivers all /dynamicupdate disable /showoobe none
I’m bypassing the Windows Updates portion because my machines are not connected to the Internet or a WSUS server. Any ideas? I’m using Windows 10 LTSB 2016 and trying to do an In-Place upgrade of the same version because clients are not receiving patches for a few months now. I slipstream the cumulative patches into the install.wim file every other month to keep things up to date.
Hello,
Has anyone tried these steps successfully with Windows 10 Build 1809 and please post the working command of batch file.
@Craig – For setup to work from network share, did you map the share and started the execution?
Hi! Yes! Im using setup.exe /auto upgrade /migratedrivers all /dynamicupdate disable /showoobe none with the 1809 build. you dont need to map the share really, just type the line into the run window and let it go…
Hi all,
I have been using this command and running into a strange issue at times on some HP computers. These particular computers autologin to Windows using a generic domain acct. What I am having happen, is that the upgrade finishes and the pc reboots and I get a login screen asking for email address or phone number and then a password box. I am unable to login using a domain or local acct and switch user is gone. I am unable to access the pc at all. Is there anyway to include “hideonlineaccountscreens” using this command instead of an unattend file? Does the oobe none switch do the same thing? Or should I use /auto upgrade /quiet? I hope someone can help.
why do you need the “/pkey” switch? i thought one could use the Windows 7 key if this is an in-place upgrade?