update
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
## Make sure the computer is running Windows 10
|
||||
If ( ([System.Environment]::OSVersion.Version).Major -ge 10 ) {
|
||||
|
||||
## Make sure the endpoint isn't already running 1909
|
||||
If ( ([System.Environment]::OSVersion.Version).Build -lt 18363 ) {
|
||||
## Make sure the endpoint isn't already running 2004
|
||||
If ( ([System.Environment]::OSVersion.Version).Build -lt 19041 ) {
|
||||
|
||||
## Set the directory where the Windows Update Assistant will be downloaded to
|
||||
$DOWNLOADS = "${Env:TEMP}"
|
||||
|
||||
## URL to the 1909 version of the Windows Update Assistant
|
||||
$URL = 'https://download.microsoft.com/download/9/b/f/9bf08afb-bfd8-488a-9ce6-90134cea4d8f/Windows10Upgrade9252.exe'
|
||||
## URL to the 2004 version of the Windows Update Assistant
|
||||
## If $URL is already defined when the script is run, just use that value
|
||||
If ( !($URL) ) { $URL = 'https://download.microsoft.com/download/8/3/c/83c39dca-2d27-4c24-b98b-0a4d6d921c80/Windows10Upgrade9252.exe' }
|
||||
|
||||
## Uninstall previous Windows 10 Update Assistant
|
||||
If ( Test-Path "${Env:SystemDrive}\Windows10Upgrade\Windows10UpgraderApp.exe" )
|
||||
@@ -48,6 +49,6 @@ If ( ([System.Environment]::OSVersion.Version).Major -ge 10 ) {
|
||||
Remove-Item "${DOWNLOADS}\${FILENAME}"
|
||||
}
|
||||
|
||||
} Else { Write-Host "This endpoint is already up to date." }
|
||||
} Else { Write-Output "This endpoint is already up to date." }
|
||||
|
||||
} Else { Write-Host "This endpoint is not running Windows 10." }
|
||||
} Else { Write-Output "This endpoint is not running Windows 10." }
|
||||
|
||||
Reference in New Issue
Block a user