# Description: # This script optimizes Windows updates by disabling automatic download and # seeding updates to other computers. # Import-Module -DisableNameChecking $PSScriptRoot\..\lib\force-mkdir.psm1 Write-Output "Disable automatic download and installation of Windows updates" force-mkdir "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU" Set-ItemProperty "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU" "NoAutoUpdate" 0 Set-ItemProperty "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU" "AUOptions" 2 Set-ItemProperty "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU" "ScheduledInstallDay" 0 Set-ItemProperty "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU" "ScheduledInstallTime" 3 Write-Output "Disable seeding of updates to other computers via Group Policies" force-mkdir "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization" Set-ItemProperty "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization" "DODownloadMode" 0 #echo "Disabling automatic driver update" #sp "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching" "SearchOrderConfig" 0 $objSID = New-Object System.Security.Principal.SecurityIdentifier "S-1-1-0" $EveryOne = $objSID.Translate( [System.Security.Principal.NTAccount]).Value echo "Disable 'Updates are available' message" Write-Output "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)"