Windows – How to download a Windows 10 ISO file from Microsoft via the command-line

windows

I know that I can download the official Windows 10 Pro ISO image by using the Media Creation Tool that Microsoft provides on their website: https://www.microsoft.com/en-us/software-download/windows10

However, this program ("MediaCreationTool1809.exe") does not appear to have any command-line options. Thus, I must manually click through the wizard in order to download the ISO.

Is there a way to automatically download the Windows 10 ISO via some sort of command-line process? I want to run a script to check for the latest version of Windows 10 Pro and then, if there is a new version, automatically download it.

Best Answer

As far as I'm aware, this is not possible.

Microsoft only packages their Windows 10 ISOs per major release. This usually happens every couple of months. For example, with their October 2018 and April 2018 updates.

Additionally, it is not required that you use the Media Creation Tool. The Media Creation Tool only appears if your browser uses a Windows browser agent (read: a browser identifier). If you spoof your browser agent to one of another operating system (i.e. macOS) or if you go to the Windows 10 portion of the MS website from a computer of another platform, it is entirely possible to arrive at this screen.enter image description here

From here, what you can do is select the edition/version and language and download. Sounds simple enough, right? Just a simple query to see if the drop-down dialog box has anything new and if not, then go for the latest version with a simple pull command, right?

Well, it would be. However, Microsoft generates personalized download links for each combination of ISO. What that means is that these links that are generated expire 24 hours from their creation, making anything like that next to impossible unless someone here other than me manages to find a link from a source other than Microsoft with the ISOs that doesn't expire.

TL;DR - Because Microsoft expires their download links after 24 hrs, it is most likely not going to work by having a command line script pull down the Windows 10 ISO automatically.