# Start scanning for updates
Write-Host "Scanning for updates..."
usoclient StartScan
# Wait for scan to complete (optional, adjust timing as needed)
Start-Sleep -Seconds 10
# Check for pending updates using WMI
$UpdatesPending = Get-WmiObject -Namespace "Root\cimv2" -Query "Select * from Win32_QuickFixEngineering" | Where-Object { $_.HotFixID -eq "" }
if ($UpdatesPending) {
Write-Host "Updates found. Starting download..."
usoclient StartDownload
Write-Host "Downloading updates. Starting installation..."
usoclient StartInstall
} else {
Write-Host "No updates found."
}
Comments
0 B
|👍
/👎
0 B
|👍
/👎
0 B
|👍
/👎