Silent Update Windows 10 to 22H2 using PowerShell and Windows 10 Update Assistant

PowerShell script to update the existing Windows 10 using the handy Windows 10 Update Assistant.

Didn’t bother to package this, as we only had 1026 outdated devices which were online 24/7.

Validated this from W10 1903 and higher to W10 22H2.

Script runs completely silent in the background and only popped up after +-45 minutes to prompt a Restart now window which can be delayed.

After restarting the PC, we received one more confirmation window.

Note: Rerunning the script on an updated Windows 10 22H2 will not show anything. However the process keeps running and the window is hidden until a restart occurs.

# Variables
$TempDir = "C:\Temp"
$WebClient = New-Object System.Net.WebClient
$URL = 'https://go.microsoft.com/fwlink/?LinkID=799445 '
$File = "$($TempDir)\Windows10Upgrade9252.exe"

# Process
If(!(Test-Path -Path $TempDir)) { New-Item -ItemType Directory -Path $TempDir }
$WebClient.DownloadFile($URL,$File)
Start-Process -FilePath $File -ArgumentList '/quietinstall /skipeula /auto upgrade /copylogs $TempDir'

https://www.microsoft.com/en-us/software-download/windows10


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *