Ae banner

Windows 10 Feature Update

Upgrade Win 10 to the latest version

Description

This agent procedure will upgrade Windows 10 to Build 1909 to - This solution will audit and upgrade Windows 10 Feature to the latest version.

Developer
  • Name: Douglas Sanchez
  • Company: Kaseya
  • Website: http://www.kaseya.com
  • Contact Developer
  • Summary
  • Windows 10 Feature Update
  • 861 Downloads
  • Version:
  • Initially Released January 13th, 2020
  • Reviews
    Gravatar for Michael VonHatten
    by Michael VonHatten on March 19th, 2021

    works great with w10pro - thx

    Gravatar for Jim Considine
    by Jim Considine on August 24th, 2020

    The process works great. Easy to deploy to multiple systems over a weekend. Will look to use this to deploy build 2004

    Discussion
    Gravatar for Daniel Valenti
    Daniel Valenti over 1 year ago

    Is there any way to prevent the auto reboot? 

    Gravatar for Douglas Sanchez
    Douglas Sanchez over 1 year ago

    Yes, you would need to add the "/noreboot" switch on line 16

    Gravatar for Wouter Keizer
    Wouter Keizer about 1 year ago

    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?

    Gravatar for Johan
    Johan about 1 year ago

    @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.

    Gravatar for Richard Gericke
    Richard Gericke about 1 year ago

    Doesn't work for Enterprise Edition 

    Gravatar for Wouter Keizer
    Wouter Keizer about 1 year ago

    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.

    Gravatar for Johan
    Johan about 1 year ago

    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

    Gravatar for Martijn Wenke
    Martijn Wenke about 1 year ago

    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.

    Gravatar for Gertjan
    Gertjan about 1 year ago

    Does this script work on NL versions?

    Gravatar for mreyesleal@gmail.com
    mreyesleal@gmail.com about 1 year ago

    Guys, im really new on this, its there any ways to check the steps on doing this?

    Thanks!!!!

    Gravatar for Phil
    Phil about 1 year ago

    I am new to this too.  What do I do with this file/script once I download it?

    Gravatar for Kim
    Kim about 1 year ago

    Is there any known fix to get this to work on the enterprise edition of Windows 10?

    Gravatar for Anthony Byrd
    Anthony Byrd about 1 year ago

    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. 

    Gravatar for Laurens Driessen
    Laurens Driessen about 1 year ago

    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? 



    Gravatar for Johan
    Johan about 1 year ago

    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)

    Gravatar for Laurens Driessen
    Laurens Driessen about 1 year ago

    @Johan

    Thank you, that did the trick.

    Gravatar for David Horvath
    David Horvath about 1 year ago

    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


    Gravatar for Brian McLaughlin
    Brian McLaughlin 11 months ago

    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?

    Gravatar for Chris Amori
    Chris Amori 11 months ago

    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.

    Gravatar for Chris Amori
    Chris Amori 11 months ago

    BTW, can anyone confirm that the /noreboot actually works?    In my initial testing of the upgrade utility, it would ignore this.


    Gravatar for Brian McLaughlin
    Brian McLaughlin 11 months ago

    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.



    Gravatar for Jonathan
    Jonathan 11 months ago

    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. 

    Gravatar for Brian McLaughlin
    Brian McLaughlin 11 months ago

    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

    Gravatar for Cees
    Cees 11 months ago

    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


    Gravatar for Rich Tyree
    Rich Tyree 11 months ago

    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

    Gravatar for Jay Jansen
    Jay Jansen 11 months ago

    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.

    Gravatar for Andreas Exner
    Andreas Exner 11 months ago

    or with Powershell : Get-ComputerInfo | Select-Object -ExpandProperty Windowsversion

    Gravatar for Andreas Exner
    Andreas Exner 11 months ago

    Douglas? Where exactly did you get the commandline switches from?

    Gravatar for Douglas Sanchez
    Douglas Sanchez 11 months ago

    @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

    Gravatar for Douglas Sanchez
    Douglas Sanchez 11 months ago

    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 

    Gravatar for Andreas Exner
    Andreas Exner 11 months ago

    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

    Gravatar for Dmitrij Kondrasov
    Dmitrij Kondrasov 11 months ago

    Is it upgrading to 1909 version or latest?

    Ex. now latest 2004. is it upgrade 1909 or 2004?

    Gravatar for Eric Peacock
    Eric Peacock 11 months ago

    @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.

    Gravatar for Dmitrij Kondrasov
    Dmitrij Kondrasov 10 months ago

    Just checked. This procedure upgrading to latest build. For now it 2004.

    Gravatar for Kiran
    Kiran about 1 month ago

    I can seem to import the script after downloading it.....tried it on multiple computers...it just does not show.

    Gravatar for Kiran
    Kiran about 1 month ago

    I cannot import the script after downloading it.....tried it on multiple computers...it just does do anything. neither does it show up in any of the folder in the Agent Procedure section/menu

    Gravatar for Daniel Valenti
    Daniel Valenti about 1 month ago

    same here i cant import the script. Nothing shows on the tree of agent procedures. 

    Gravatar for Daniel Valenti
    Daniel Valenti about 1 month ago

    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 

    Gravatar for Jason Madigan
    Jason Madigan about 1 month ago

    I'm getting "File was not uploaded" when I try to import it via the Import Center.

    Gravatar for Dhaval Brahmbhatt
    Dhaval Brahmbhatt 28 days ago

    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 

    Gravatar for Daniel Valenti
    Daniel Valenti 28 days ago

    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.

    Gravatar for Glenn Barnas
    Glenn Barnas 28 days ago

    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.

    Gravatar for Ivo
    Ivo 26 days ago

    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.

    Gravatar for Glenn Barnas
    Glenn Barnas 25 days ago

    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.

    Gravatar for Josh Shapiro
    Josh Shapiro 25 days ago

    After importing the xml file, where does it go? I can't find it