You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.6 KiB
30 lines
1.6 KiB
# 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
|
|
|
|
|
|
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)"
|
|
|