Skip to content

Instantly share code, notes, and snippets.

@rossarioking
Last active May 27, 2024 03:04
Show Gist options
  • Save rossarioking/d2351c07a4f869cb596bbe67e1dc7fcc to your computer and use it in GitHub Desktop.
Save rossarioking/d2351c07a4f869cb596bbe67e1dc7fcc to your computer and use it in GitHub Desktop.
PowerShell Script to Bypass Local WSUS Server and Pull Updates Straight from the Internet. #PowerShell
# Stop the Windows Update service
Stop-Service -Name wuauserv
# Remove the registry key
Remove-Item HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate -Recurse
# Start the Windows Update service
Start-Service -name wuauserv
@MrCE
Copy link

MrCE commented Jan 16, 2023

Worked like a charm updating Azure Stack HCI 21H2 to 22H2 when node is connected to WSUS by GPO. At current date WSUS don't support Azure Stack HCI feature update.

@stingusss
Copy link

Worked for me as well! Thank you!

@gabrielgbs97
Copy link

Be careful with this method, as it can remove GPO-related restrictions like automatic updates scheduling, or disabled automatic updates. A more fine-grained approach would be:

Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "UseWUServer" -Value 0
Restart-Service -name wuauserv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment