Debloat-Windows-10/scripts/optimize-windows-update.ps1

24 lines
1.3 KiB
PowerShell
Raw Normal View History

2015-08-04 18:59:27 +00:00
# Description:
2015-08-07 13:49:34 +00:00
# This script optimizes Windows updates by disabling automatic download and
# seeding updates to other computers.
2015-08-04 18:59:27 +00:00
2015-08-12 06:36:49 +00:00
echo "Disable automatic download and installation of Windows updates"
2015-08-22 17:02:16 +00:00
mkdir -Force "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU"
sp "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU" "NoAutoUpdate" 0
sp "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU" "AUOptions" 2
sp "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU" "ScheduledInstallDay" 0
sp "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU" "ScheduledInstallTime" 3
2015-08-07 11:21:43 +00:00
echo "Disable seeding of updates to other computers via Group Policies"
2015-08-22 17:02:16 +00:00
mkdir -Force "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization"
sp "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization" "DODownloadMode" 0
#echo "Disabling automatic driver update"
2015-08-22 17:02:16 +00:00
#sp "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching" "SearchOrderConfig" 0
echo "Disable 'Updates are available' message"
takeown /F "$env:WinDIR\System32\MusNotification.exe"
icacls "$env:WinDIR\System32\MusNotification.exe" /deny "Everyone:(X)"
takeown /F "$env:WinDIR\System32\MusNotificationUx.exe"
icacls "$env:WinDIR\System32\MusNotificationUx.exe" /deny "Everyone:(X)"