Windows 7 EOL Upgrade to Windows 10

Hi Team,

With the EOL of Windows 7 here is there a script or can one be created to push upgrades to Windows 10?

@libretech ,

We will get our Scripts Developers feedback on your input and see if this can be achievable via scripting.

Hi @libretech,

Sorry to inform you that it’s not achievable through the script. Our script developers tried their best.

Kind Regards,
PremJK

There’s some command line options that help have a Win 10 upgrade that doesn’t ask for any user input, skips the checking for updates… and skips the OOBE after the restart.

setup.exe /auto upgrade /quiet /showoobe none /DiagnosticPrompt enable /dynamicupdate disable

You do have to know the drive letter of the mounted image to run setup.exe from. Maybe it can be mounted from a network share to the same drive letter each time.

https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-command-line-options

Might this help a little to get a script started? Or what was the trouble the developers had?

Thanks much…

-m

Hi @invisikcorp,

We appreciate your efforts and input. Our script developers have checked the command provided and found that it leads to the following error even after mounting the image file to a path

We assume that these commands may be no longer supported as they dated 2017

We have also tried the instructions provided in the following links and we could only notice that the Windows 10 Upgrade Assistant is being installed and no further progress.

Links Referred:

https://venturebeat.com/2015/07/28/how-to-force-windows-to-start-downloading-the-windows-10-update-files/

Following is the link reference, where they have suggested to purchase the software online, instead of in-system upgrade that is no longer supported.

Hence, Our script developers suggested this is NOT achievable through the script.

Please let us know in case of any queries.

Kind Regards,
PremJK

Oh but as MSP’s we’re using Volume Licensing almost all of the time. I have done an upgrade from the comand line many times. The command line is very strange about using the command line switches, like /auto…

try putting the command line in quotes and see if it works.

https://www.msftnext.com/windows-10-setup-exe-command-line/ from 2019
https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-command-line-options

Please don’t give up on this… we will be needing to install new Windows 10 builds for many, many years ahead.

Thank you.

-m
ps i have another script for this… ill try to post it for you.

Hi @invisikcorp,

Our scripts developers tried with provided commands but unfortunately, it didn’t work.

We have also tried few instructions given in following links:

  1. Installation of Media Creation Tool
    Can you still get a Windows 10 upgrade for free? | ZDNET
    How to download Windows 10 for free | Digital Trends
    How can I force my Windows 10 laptop to update? | Windows 10 | The Guardian
    Upgrade Windows 7 To Windows 10 Free 2023 [Accesibility Upgrade]

The Media Creation tool was not supported by the environment and displays the following error

  1. Powershell script to upgrade Windows using Windows Upgrade Assistant.
    Quickly Upgrade Windows 7 to Windows 10 for Free With This PowerShell Script | Lifehacker

Can you please share the scripts which you have mentioned. Our Script developers will analyse them and try to turn out with a positive result.

Kind Regards,
PremJK

Hopefully the RMM platform becomes more robust to be able to handle these types of upgrades.

This is the script I manually run to upgrade Windows 10 computers to a newer build. Sometimes is gives me an error at the end, but the upgrade still runs.

First I download the Windows 10 ISO from: https://www.microsoft.com/en-us/software-download/windows10 … I have ISO’s for all builds as I’ve downloaded and saved them over the last few years.

Then I move the ISO file to my server share location. My server name is “NOC50”

Then I run this PowerShell script that I found on the internet and modified:


write-host "Connecting to NOC50..."

## Logs into my server
net use y: \
oc50\pcinstallfiles /user:NOC50\<username> <password>

## Path of ISO image to be mounted 
$ImagePath= "\\NOC50\PCInstallFiles\Software\Windows10\Windows10-1809.iso"

write-host "Mounting Windows 10 1809 disk image..."

## This portion finds the drive letter the ISO is mounted on
$ISODrive = (Get-DiskImage -ImagePath $ImagePath | Get-Volume).DriveLetter
IF (!$ISODrive) {
Mount-DiskImage -ImagePath $ImagePath -StorageType ISO
}
$ISODrive = (Get-DiskImage -ImagePath $ImagePath | Get-Volume).DriveLetter
Write-Host ("The mounted ISO drive letter is " + $ISODrive + ":")

## This creates the path to the setup.exe file
$setuppath = ($ISODrive) + ":\setup.exe" 

write-host "This is the command line:  "$setuppath "/auto upgrade /quiet /showoobe none"

## This starts the upgrade with the parameters to make it silent and not run the OOBE after reboot
$cmdlineout = start-process $setuppath "/auto upgrade /quiet /showoobe none"

write-host Command-line output--should be blank:  $cmdlineout

write-host Windows 10 1809 silent upgrade has begun (if output line is blank above)

## This part opens Task Manager so you can see that the setup process is running (you wouldn't need to do this on an unattended script)
write-host Expand the Windows PowerShell app in Task Manager to see the Windows 10 Setup processes...

taskmgr

I truly hope this helps. I also found out that ConnectWise Automate has a script for this, so it can be done.

Thanks again for your work on this.

-m

I founds this online, have not tried it.

https://social.technet.microsoft.com/Forums/windows/en-US/51104081-4ed7-4fdd-8b12-5d1f5be532ae/windows-10-feature-update-via-cmd-powershell-or-gpo

Hi, Not sure if you have found an answer to your query, but here is one I’ve been working on for my company;

$dir = ‘C:_Windows_FU\packages’
mkdir $dir
$webClient = New-Object System.Net.WebClient
$url = ‘https://go.microsoft.com/fwlink/?LinkID=799445
$file = “$($dir)\Win10Upgrade.exe”
$webClient.DownloadFile($url,$file)
Start-Process -FilePath $file -ArgumentList ‘/quietinstall /skipeula /auto upgrade /copylogs $dir’

Works nicely on every machine I have deployed to. (Although I deploy via Labtech)

*Note, this will update to the latest public release of Windows 10, currently 1909, but when 2003 is released, it will likely switch to that.

Hope this helps!

  • Edited by StuartGeeves Wednesday, January 15, 2020 8:18 PM

Another that looks like it works

https://deploymentbunny.com/2017/12/05/nice-to-know-mass-upgrading-windows-10-using-powershell/

Hi @invisikcorp,

Thank you so much for providing valuable inputs and we have shared the same to our script developers. We will update you on the latest script developer feedback.

Kind Regards,
PremJK

Hi @invisikcorp,

We are extremely sorry, our script developers tried their best to achieve this script but we are not able to do it.

Kind Regards,
PremJK

Capture1.PNG

Thanks, this is unfortunate.

As others have accomplished this, I find this answer unacceptable.

As mounting the ISO seems to be the problem… how about we extract the ISO and then put it into a ZIP file instead? Is that easier to work with for the scripting?

-m

OK… I extracted the Windows 10 1809 ISO and zipped it up into Windows-1809.zip. I have it shared on my server so it can be downloaded from the internet.
There is a command in powershell to unzip files: Expand-Archive <zip file> -DestinationPath <path>

Can they make a script that will:

  1. Download the Windows-1809.zip file
  2. Extract the files using the Expand-Archive powershell command
  3. Run the setup.exe with command line arguments that I can specify

Please let us know. Thanks.

-m

Hi @invisikcorp,

Thanks for your input. We have asked our script developers to check and provide their feedback.

Kind Regards,
PremJK

Hi @invisikcorp,

Our script developers request you to share the URL to download the setup file to test and investigate this script request.

Thanks in advance.

Kind Regards,
PremJK

sorry, here it is:

https://invisik.syncedtool.com/1/files/share/10832/ZZApplicationDeployment/Windows10-1809.zip/5eb777212e5401

Hi @invisikcorp,

Thanks for providing the requested downloadable setup file. We have shared it with our script developers.

Kind Regards,
PremJK