Upgrade to new Windows 10 version via command line automation

Windows 10 began with version 1507 and was first released in July of 2015 (that’s how they number the release by the way, year/month). Since then they have regularly released two updates each year, and each time it can either go smoothly or be disastrous.

If you’re like any cautious IT person, you wait a little bit before potentially unleashing Microsoft’s terror on your organization. You also want to have a controlled method of rolling out each new version.

While you could just approve the update through WSUS and let nature take its course, many may opt for a safer route. Allow me to introduce that route to you.

Essentially, you will need to download the Windows Media Creation tool, then download the new ISO. Don’t use that old media creation tool you have lying around, otherwise you might download the wrong version of Windows 10. Go ahead and get the latest version, I’ll wait.

Now that you have your ISO, extract it to a folder. I named mine “Windows 10 Update 1809” which will leave no doubt later on what’s inside it. Store that folder in an easily accessible location because this folder will be copied often.

Whether you have 50 computers in your organization or 5,000 there is one thing for certain, we want to automate this.

There are two commands you’ll need. The first is to copy the newly extracted ISO folder to the target computer, which is:

robocopy “\\Server\Windows 10 Update 1809” “C:\Windows 10 Update 1809” /e

Once that is done, you’ll then need to initiate the update with this command:

“C:\Windows 10 Update 1709\setup.exe” /auto upgrade /quiet

Depending on the speed of your network and computer, this process should take no longer than an hour and a half, and often much faster. Your computer must restart during this time, and when you log in, you will have to go through the welcome screen process after each version update.

These two commands when ran like this only work for your own computer however. While there’s commands and batch file processes available to get this out to all of your computers, I recommend using PDQ Deploy by Admin Arsenal. This makes the job a lot simpler. You can use their free version, but the paid versions are worth their weight in gold (which come to think of it wouldn’t be much considering that the program is so lightweight, so scratch that metaphor).

Once you’ve downloaded and installed PDQ Deploy (you should go ahead and get PDQ Inventory while you’re at it), open up Deploy and create a new package. Create two command line steps, with the first step including the file transfer command listed above. You can also use the program’s built in file transfer step, but both work fine. The second command line step will be to initiate the update.

Save your package, test run it on a workstation for peace of mind, and then schedule the rest of your computers to receive the update in whatever time frame you’d like. You could do small batches in order to minimize any potential fallout you might possibly have to deal with the next day, or if you’re feeling brave, update them all at once.

Whichever way you choose to do this, it’s as simple as entering in all of the computer names you want to deploy to, then clicking Schedule to decide what day and time the deployment will run. If you installed PDQ Inventory, this gets all that much simpler because you can import all of your computers into Inventory from Active Directory, then deploy this newly created package by targeting those computers in PDQ Inventory. This negates the need for mind-numbing computer name entry into PDQ Deploy. Inventory also gives you a handy method for keeping track of just about everything you’d need to know about your computers.

Don’t forget the cleanup afterwards. Once the updates have finished, simply run another package with the command line step to delete the folder you created previously on each target computer.

rmdir “C:\Windows 10 Update 1809” /s /q

If you have any questions about how both Inventory and Deploy work, Admin Arsenal has a YouTube channel with lots of helpful videos, as well as a blog.

Good luck out there!

Update: This little how-to article has seen a lot views, so it has been updated to be more versatile. – 9/29/18

8 thoughts on “Upgrade to new Windows 10 version via command line automation

Add yours

  1. Thank you for this well written article. Implementing 1703 has been nothing but a headache for me. I can’t get WSUS to push it, and when I try to use PDQ, I run into a problem that executing setup.exe requires admin permissions, and the admin account can’t access the remote PC. If you think about expanding the article, adding package setup in PDQ deploy would be a great help.


    1. Please ensure you’re using a domain administrator account in PDQ which is a local administrator on the computers you are deploying to.

      Deploying over a VPN tends to create problems as well, if that is applicable to your situation.

      You should have everything you need here to successfully deploy the update. I’m fairly certain you’re having a permissions issue.

      Have you tried installing a program via PDQ to see if that works? You could try installing one of the pre-made packages that Admin Arsenal makes available.


  2. Great write-up.

    If you want to skip the Welcome steps on first boot (Out of Box Experience), you can add /showoobe none to your setup.exe command line.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: