locked
Windows 10 Feature update via cmd, Powershell or GPO RRS feed

  • Question

  • Is it possible to initiate Windows 10 new Feature upgrade (currently to v1903) via cmd, Powershell or GPO from Windows Update?
    Tuesday, September 10, 2019 7:33 AM

Answers

  • 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 Missed small disclaimer
    • Marked as answer by auxinaz Friday, January 17, 2020 5:42 AM
    Wednesday, January 15, 2020 8:17 PM

All replies

  • Hi,

    Yes you can initiate installation of Windows updates from the Command Prompt or PowerShell or GPO.

    PowerShell:

    Install the following PowerShell module:

    Install-Module PSWindowsUpdate


    You can then use the following cmdlets to get updates and install them:

    Get-WindowsUpdate

    Install-WindowsUpdate

    Command Prompt:

    Start checking for updates:

    UsoClient StartScan

    Start downloading Updates:

    UsoClient StartDownload

    Start installing the downloaded updates:

    UsoClient StartInstall

    Restart your device after installing the updates:

    UsoClient RestartDevice

    Check, Download and Install Updates:

    UsoClient ScanInstallWait


    More information can be found here:

    How to run Windows Updates from Command Line in Windows 10
    https://www.thewindowsclub.com/how-to-run-windows-updates-from-command-line-in-windows-10

    Group Policies:

    You can refer to Microsoft's official documentation over here:

    Deploy Windows 10 updates using Windows Server Update Services (WSUS)
    https://docs.microsoft.com/en-us/windows/deployment/update/waas-manage-updates-wsus

    Best regards,
    Leon


    Blog: https://thesystemcenterblog.com LinkedIn:

    Tuesday, September 10, 2019 7:40 AM
  • I was not asking about initiating updates in general, I was asking specifically about Feature updates to a new Windows 10 version. Suggested commands only install general Windows updates only! In short, I need to "press" this button using cmd, Powershell or GPO (in order to automate):

    Or is it only available in GUI???
    • Edited by auxinaz Tuesday, September 10, 2019 10:15 AM
    Tuesday, September 10, 2019 10:14 AM
  • Apologies for my misunderstanding, I believe you can only perform feature updates from the GUI, unless you download the feature update ISO and run it from the Command Prompt/PowerShell.

    Blog: https://thesystemcenterblog.com LinkedIn:

    Tuesday, September 10, 2019 10:41 AM
  • Hi,

    Was your issue resolved?

    If you resolved it using our solution, please "mark it as answer" to help other community members find the helpful reply quickly.

    If you resolve it using your own solution, please share your experience and solution here. It will be very beneficial for other community members who have similar questions.

    If no, please reply and tell us the current situation in order to provide further help.

    Best Regards,

    Lee


    Just do it.

    Friday, October 4, 2019 8:23 AM
  • 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 Missed small disclaimer
    • Marked as answer by auxinaz Friday, January 17, 2020 5:42 AM
    Wednesday, January 15, 2020 8:17 PM
  • Thank you, this is exactly what I needed. It works!
    Friday, January 17, 2020 5:43 AM
  • Can I freaking kiss you bro?

    I've been trying to find a painless way to deploy feature updates via Labtech....

    This is perfect. Thank you so much for sharing!!!!

    Saturday, January 18, 2020 1:57 AM
  • Thank you Stuart! Have been looking everywhere for a non-WSUS solution.
    Wednesday, February 19, 2020 9:50 PM
  • I tried this in CW Automate and it does not reboot the machine.  I can see the update assistant process but it has been at 0% cpu for a long time and nothing.  Did you put any final steps to reboot after?
    Sunday, March 1, 2020 10:14 PM
  • Hi, we can add few thing in this script, like first it will check windows version then it will update automatically. and last it will delete the folder which is created C:\_Windows_FU\packages'

    $winVer = [System.Environment]::OSVersion.Version.Major
    $dir = 'C:\_Windows_FU\packages'
    mkdir $dir

    if ($winVer -eq 10)
        {  
            $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'
            } 
        
        else 

            {
                echo "This is Not Windows10 OS "
            }
        
    sleep 10

    Remove-Item "C:\_Windows_FU" -Recurse -Force -Confirm:$false

    Hope this is more helpful for you

    Thank you

    Monday, March 2, 2020 1:16 PM
  • Hi @stuartgeeves

    I use Automate as well and am new at scripting.  I have a script that I have been able to download the ISO from a share and mount it, but can't get it to execute.

    Your process looks much simpler.  Is this all one PS script?  As admin?

    I used your script in all one function as Admin and it gets to the point of download, but never installs.

    I also changed the last line in a second separate script to test, same thing.  Downloads but never updates.

    Start-Process -FilePath "C:\_the_download\packages\Win10Upgrade.exe" -ArgumentList "/quietinstall /skipeula /auto upgrade /copylogs $dir"

    Ideas?  Permissions are all good.

    **I also never get any log created with either attempt.

    • Edited by ViCiouSSoRrel Saturday, August 8, 2020 12:20 PM updated
    Thursday, August 6, 2020 7:45 PM