Upgrade Win 10 to the latest version
This agent procedure will upgrade Windows 10 to Build 1909 to - This solution will audit and upgrade Windows 10 Feature to the latest version.
works great with w10pro - thx
The process works great. Easy to deploy to multiple systems over a weekend. Will look to use this to deploy build 2004
Yes, you would need to add the "/noreboot" switch on line 16
Hi, im running in to an issue with windows 7 PRO OEM
OS is activated but check of this script says it is not.
Therefore upgrade is not starten.
Any idea what the cause could be?
@Wouter Possibly a language thing? Check what language Windows reports the activation status in. Run the PoSH command manually for this. Adapt the script as needed.
Doesn't work for Enterprise Edition
Sounds good but im not very good with Powershell or scripting language.
What command should i run from the script in local PowerShell.
OS is Dutch by the way.
Sorry, I messed up, this script should not mess up with other languages (the 1903 one does). Run this on the target machine, if it returns 1, it should run fine:
(Get-CimInstance SoftwareLicensingProduct -Filter "Name like 'Windows%'" | where { $_.PartialProductKey }).LicenseStatus
Sometimes the script estimated that there was not enough free space, but there was more that 32 GB. The command '((Get-PSDrive C).Free/1GB)' returned for example 104,748271942139. I changed the Powershell command to fix this issue with a cast to integer: [int]((Get-PSDrive C).Free/1GB). At the same system this command returned 105, so it could continue with the next steps.
Does this script work on NL versions?
Guys, im really new on this, its there any ways to check the steps on doing this?
Thanks!!!!
I am new to this too. What do I do with this file/script once I download it?
Is there any known fix to get this to work on the enterprise edition of Windows 10?
Running into same problem as @wouter and after trying to run the command you specified it returns that Get-CimInstance is not a recognized internal command.
Hi there,
For most VM's and systems the Agent Procedure finished succesfully.
About the failed ones I got the same issue as @Martijn Wenke:
"Sometimes the script estimated that there was not enough free space, but there was more that 32 GB."
The W10 Home (x64 + activated + 1903 build) system which failed has 196GB free disk space.
What could cause this and how to fix this?
It's because of regional setting (dot vs comma). Just round down to the GB to avoid this. Replace the first PoSH command in the procedure by this one:
[math]::Round((Get-PSDrive c | Select-Object -ExpandProperty Free)/1GB,0)
@Johan
Thank you, that did the trick.
I am trying to run the procedure on a windows 10 VM and I keep getting the error message: Script Summary: Failed Then in step 2(line 3). I'm guessing this is the same problem that occurred with Martijn Wenke had but, I'm not sure how to resolve this. Would I just replace
((Get-PSDrive C).Free/1GB)
With
[int]((Get-PSDrive C).Free/1GB)
Thanks for any help
I'm getting "SUCCESS THEN" returned as the status, but nothing seems running or updating. The status is showing success after only about 5 minutes.
Any idea what might cause this?
Brian, "Success Then" is just a Kaseya response saying it ran the script with no syntax failures. If the script is not working, it is likely that your machine can't be upgraded for some reason. My suggestion would be to run the updater manually and see what error is preventing it from installing.
BTW, can anyone confirm that the /noreboot actually works? In my initial testing of the upgrade utility, it would ignore this.
No errors when I log in remotely and manually run windows update. I have been doing it this way for a week now on some ~100 computers to get them up to date (mind numbing). Trying to find a way to push this to another 500+ computers so that this isn't a month long project.
Hi Brian. The procedure itself finishes pretty quickly but the actual upgrade takes 45 minutes to multiple hours and will continue well after Kaseya reports the procedure has completed "successfully". I've relied on a combination of patience (just wait 2 hours after running) and View to check the OS build number. If the OS build number hasn't' changed after 2 hours, then it probably failed. We've been able to upgrade 900+ machines using this method with a high success rate.
Thank you for the help guys, I will continue to monitor. If I log in remotely the computers don't seem to be installing anything in the background, or rebooting.
Didn't see anything failing in the procedures log so maybe it just hasn't had enough time.
Appreciate the help
Hi Brian, maybe u can also use Microsoft SetupDiag to determine what the cause is of the unsuccessful upgrade. https://docs.microsoft.com/en-us/windows/deployment/upgrade/setupdiag
Agree with @Johnathan comment, i have used an unmodified version, you really should allow the reboots however. I have hit my system in bunches of 50 then wait 15 minutes - launch the next 50, only so that i am not saturating my known links. this would vary for your use i would assume but the largest i have have deployed in one sitting was about 300 (i had a weekend) and it took 9 hours for the last one to come online.
I use views with filters for the OS build version, then i can get granular by dropping into the organization.
I have completed hundreds (if not thousands by now) of updates using this script as well, with very high successes rate, when they did fail, and on review, i had issues on the system. Corrupt installer was number one, less than 30GB free was two and the other was unhealthy disk. none of the failed installs crippled my systems, it just says successful and does not complete.
for me i run a post cleanup stored procedure though to clear out the leftover files, not just form the update bot overall clean.
Hope this was helpful
A cleaner way to see the windows 10 version is to use a custom column and a script to query the releaseID from the registry that will give you the friendly 1809/1903/1909/etc version. Then you can build views on this (example <1903 on that custom value in the advanced editor)or do exports from manage agents to get a good overview of the current state of a client without having to decipher the build numbers.
Query example if you want to see the data and adapat to your own script:
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v releaseid
Once you have a script then you can just add it to your existing deployment script to be called via executeprocedure and set it to run 2hr from that time or so.
or with Powershell : Get-ComputerInfo | Select-Object -ExpandProperty Windowsversion
Douglas? Where exactly did you get the commandline switches from?
@Andreas I believe this is the article I used, it's been a little while though:
https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-command-line-options
Another useful link I had regarding logs during the upgrade: https://support.microsoft.com/en-us/help/928901/log-files-that-are-created-when-you-upgrade-to-a-new-version-of-window
Here are the command line switches I found out.
/Push
/Install
/SetupFile
/SkipSelfUpdate
/ReUseCatalog
/SkipEULA
/OobeUi
/OobeRS2Ui
/EosUi
/PostEosUi
/TenSUi
/PreventWUUpgrade
/SetOobeTourniquetRunningRegKey
/SetPriorityLow
/UninstallUponExit
/UninstallUponUpgrade
/ForceUninstall
/MinimizeToTaskBar
/ShowProgressInTaskBarIcon
/SkipCompatCheck
/QuietInstall
/NoRestartUI
/EnableTelemetry
/InstallationFolder
/Edition
/Language
Is it upgrading to 1909 version or latest?
Ex. now latest 2004. is it upgrade 1909 or 2004?
@Dmitrij Kondrasov, this procedure downloads the file:
https://download.microsoft.com/download/9/b/f/9bf08afb-bfd8-488a-9ce6-90134cea4d8f/Windows10Upgrade9252.exe I just downloaded and ran this on my 1909 computer and it says "Thank you for installing the latest Windows", with no option to upgrade.
Then I went to this page: https://www.microsoft.com/en-us/software-download/windows10 and downloaded the upgrade assistant from there. The download URL is different: https://download.microsoft.com/download/8/3/c/83c39dca-2d27-4c24-b98b-0a4d6d921c80/Windows10Upgrade9252.exe
Same .exe filename, but different URL paths.
It looks like this procedure links to the 1909 upgrade assistant only.
Just checked. This procedure upgrading to latest build. For now it 2004.
I can seem to import the script after downloading it.....tried it on multiple computers...it just does not show.
same here i cant import the script. Nothing shows on the tree of agent procedures.
You need to go to System > Server Management > Import Center to import this script. Not from Agent Procedures. As it says in the Installation Guide. LOL
I'm getting "File was not uploaded" when I try to import it via the Import Center.
hey Guys
I am testing this to upgrade from 1909 to 2009 directly.
It did the download of the ESD etc all ok and I think it did what it needed to do just fine but didn't reboot the computer.
Once I manually rebooted the computer, it started the actual upgrade of the OS.
Checking the log file called upgrader_default, I saw that it said "waitforrestart" so I assume it waits for reboot?
Is there a way to force the upgrader file to reboot the computer when it needs to?
The plan is to do this upgrade overnight so it has to reboot and not inconvenient the user, in case they reboot the computer during working hours.
BTW, this procedure itself finishes once the upgrader executable is launched with appropriate switches. The agent procedure successfully running doesn't check if the upgrade process itself went fine or not.
Anyone had this? The computer doesn't reboot to finish the upgrade? Would love to have it work properly.
Dhaval
Are you on SaaS or do you have your own VSA? I use this script to upgrade windows 7 machines and to update windows 10 machines. I have no issues with the script no rebooting the machines.
This should not depend on SAAS or On-Prem. There are a number of things that can prevent the update from starting, including free space, pending updates, pending reboots, O/S licensed, etc. This is why our tool has an optional and comprehensive pre-check mode you can run before actually downloading and running the updates. If the machine passes the check phase, it's got a great chance of completing the update without issue.
This is probably why the upgrade started after you rebooted - a pending restart flag was likely active.
Our experience has been that regardless of the initial platform build, the upgrade process takes just under 2 hours and performs 3-5 reboots. I've never had a machine not reboot after updating. If you aren't sure about pending updates/reboots, you can try starting with a reboot and then running the updater.
Hi everyone,
The procedure works fine in upgrading to the latest version which currently is 20h2 (2009). I would instead like the option to either choose which feature update to install or to always get the second to last one. My (current) goal is to upgrade to 2004 instead of 2009.
The procedure downloads the Windows10Upgrade.exe from the following link: (this one seems to always upgrade to the latest version (20h2/2009))
https://go.microsoft.com/fwlink/?LinkID=799445
I managed to find these URLs online:
1903: https://download.microsoft.com/download/9/6/4/96409c48-4ad8-4660-8482-0ca61f05d58b/Windows10Upgrade9252.exe
1909: https://download.microsoft.com/download/9/b/f/9bf08afb-bfd8-488a-9ce6-90134cea4d8f/Windows10Upgrade9252.exe
2004: https://download.microsoft.com/download/8/3/c/83c39dca-2d27-4c24-b98b-0a4d6d921c80/Windows10Upgrade9252.exe
2009/20H2: https://download.microsoft.com/download/7/a/a/7aa0472b-49a0-46d1-b651-e8a2c53f1fe4/Windows10Upgrade9252.exe
However, every single one of them seems to upgrade to the latest version anyway (20h2/2009). Does anyone know a way to upgrade to 2004 (so the second to last feature upgrade currently). I'm trying to acomplish this using a Kaseya procedure or a Powershell script that I will call using Kaseya, any help would be much appreciated.
Ivo - the URLs for the upgrade trigger a process to determine the current build of the local machine and then download the package to upgrade to the latest build. It's unlikely that those URLs will work the way you expect. You would need to identify the specific download package needed for a specific update, not the upgrader tool in the above links. You would need to identify specific packages to upgrade from the current to the specific build number. For your case, you might want to consider creating your own set of updaters using media from a 2004 ISO.
After importing the xml file, where does it go? I can't find it
Is there any way to prevent the auto reboot?