Skip to content

Instantly share code, notes, and snippets.

@SalemHarrache
Created June 13, 2022 11:14
Show Gist options
  • Save SalemHarrache/15593f2156f6c8be04becb92b4c15a8c to your computer and use it in GitHub Desktop.
Save SalemHarrache/15593f2156f6c8be04becb92b4c15a8c to your computer and use it in GitHub Desktop.
Revert Windows Update to default settings
#
# Revert Windows Update to default settings
#
Write-Host "Enabling driver offering through Windows Update..."
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Device Metadata" -Name "PreventDeviceMetadataFromNetwork" -ErrorAction SilentlyContinue
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DontPromptForWindowsUpdate" -ErrorAction SilentlyContinue
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DontSearchWindowsUpdate" -ErrorAction SilentlyContinue
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DriverUpdateWizardWuSearchEnabled" -ErrorAction SilentlyContinue
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "ExcludeWUDriversInQualityUpdate" -ErrorAction SilentlyContinue
Write-Host "Enabling Windows Update automatic restart..."
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoRebootWithLoggedOnUsers" -ErrorAction SilentlyContinue
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUPowerManagement" -ErrorAction SilentlyContinue
Write-Host "Enabled driver offering through Windows Update"
@SalemHarrache
Copy link
Author

SalemHarrache commented Jun 13, 2022

iwr -useb https://gist.github.com/SalemHarrache/15593f2156f6c8be04becb92b4c15a8c/raw/ | iex

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