Browse Source

remove reg-import from optimize update

pull/31/head
Alex Hirsch 9 years ago
parent
commit
82dbbd654c
  1. 22
      scripts/optimize-windows-update.ps1

22
scripts/optimize-windows-update.ps1

@ -2,22 +2,16 @@
# This script optimizes Windows updates by disabling automatic download and # This script optimizes Windows updates by disabling automatic download and
# seeding updates to other computers. # seeding updates to other computers.
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\reg-helper.psm1
echo "Disable automatic download and installation of Windows updates" echo "Disable automatic download and installation of Windows updates"
Import-Registry(@" mkdir -Force "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU] sp "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU" "NoAutoUpdate" 0
"NoAutoUpdate"=dword:00000000 sp "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU" "AUOptions" 2
"AUOptions"=dword:00000002 sp "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU" "ScheduledInstallDay" 0
"ScheduledInstallDay"=dword:00000000 sp "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU" "ScheduledInstallTime" 3
"ScheduledInstallTime"=dword:00000003
"@)
echo "Disable seeding of updates to other computers via Group Policies" echo "Disable seeding of updates to other computers via Group Policies"
Import-Registry(@" mkdir -Force "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization"
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization] sp "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization" "DODownloadMode" 0
"DODownloadMode"=dword:00000000
"@)
#echo "Disabling automatic driver update" #echo "Disabling automatic driver update"
#Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching" -Name "SearchOrderConfig" -Value 0 #sp "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching" "SearchOrderConfig" 0

Loading…
Cancel
Save