#WindowsUpdate and DeliveryOptimization settings
if((Test-Path -LiteralPath "HKLM:\SOFTWARE\Policies\Microsoft\Windows\
DeliveryOptimization") -ne $true) { New-Item "HKLM:\SOFTWARE\Policies\Microsoft\
Windows\DeliveryOptimization" -force -ea SilentlyContinue };
if((Test-Path -LiteralPath "HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate") -ne $true) { New-Item "HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate" -force -ea SilentlyContinue };
if((Test-Path -LiteralPath "HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate\AU") -ne $true) { New-Item "HKLM:\SOFTWARE\Policies\Microsoft\
Windows\WindowsUpdate\AU" -force -ea SilentlyContinue };
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
DeliveryOptimization' -Name 'DODownloadMode' -Value 2 -PropertyType DWord -Force -
ea SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
DeliveryOptimization' -Name 'DOMaxDownloadBandwidth' -Value 0 -PropertyType DWord -
Force -ea SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
DeliveryOptimization' -Name 'DOMaxUploadBandwidth' -Value 0 -PropertyType DWord -
Force -ea SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
DeliveryOptimization' -Name 'DOPercentageMaxBackgroundBandwidth' -Value 0 -
PropertyType DWord -Force -ea SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
DeliveryOptimization' -Name 'DOPercentageMaxDownloadBandwidth' -Value 0 -
PropertyType DWord -Force -ea SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
DeliveryOptimization' -Name 'DOPercentageMaxForegroundBandwidth' -Value 0 -
PropertyType DWord -Force -ea SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
DeliveryOptimization' -Name 'DORestrictPeerSelectionBy' -Value 1 -PropertyType
DWord -Force -ea SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate' -Name 'AcceptTrustedPublisherCerts' -Value 1 -PropertyType DWord -
Force -ea SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate' -Name 'DisableDualScan' -Value 0 -PropertyType DWord -Force -ea
SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate' -Name 'SetAutoRestartNotificationConfig' -Value 1 -PropertyType
DWord -Force -ea SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate' -Name 'AutoRestartNotificationSchedule' -Value 15 -PropertyType
DWord -Force -ea SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate' -Name 'SetAutoRestartNotificationDisable' -Value 1 -PropertyType
DWord -Force -ea SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate' -Name 'SetAutoRestartRequiredNotificationDismissal' -Value 1 -
PropertyType DWord -Force -ea SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate' -Name 'AutoRestartRequiredNotificationDismissal' -Value 2 -
PropertyType DWord -Force -ea SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate' -Name 'SetRestartWarningSchd' -Value 1 -PropertyType DWord -Force -
ea SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate' -Name 'ScheduleRestartWarning' -Value 4 -PropertyType DWord -Force -
ea SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate' -Name 'ScheduleImminentRestartWarning' -Value 15 -PropertyType DWord
-Force -ea SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate' -Name 'DeferFeatureUpdates' -Value 1 -PropertyType DWord -Force -ea
SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate' -Name 'BranchReadinessLevel' -Value 32 -PropertyType DWord -Force -
ea SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate' -Name 'DeferFeatureUpdatesPeriodInDays' -Value 0 -PropertyType DWord
-Force -ea SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate' -Name 'PauseFeatureUpdatesStartTime' -Value "" -PropertyType String
-Force -ea SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate' -Name 'ManagePreviewBuilds' -Value 1 -PropertyType DWord -Force -ea
SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate' -Name 'ManagePreviewBuildsPolicyValue' -Value 0 -PropertyType DWord
-Force -ea SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate' -Name 'DoNotAllowSP' -Value 1 -PropertyType DWord -Force -ea
SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate\AU' -Name 'NoAutoUpdate' -Value 0 -PropertyType DWord -Force -ea
SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate\AU' -Name 'AUOptions' -Value 3 -PropertyType DWord -Force -ea
SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate\AU' -Name 'ScheduledInstallDay' -Value 1 -PropertyType DWord -Force -
ea SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate\AU' -Name 'ScheduledInstallTime' -Value 2 -PropertyType DWord -Force
-ea SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate\AU' -Name 'ScheduledInstallEveryWeek' -Value 1 -PropertyType DWord -
Force -ea SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate\AU' -Name 'AllowMUUpdateService' -Value 1 -PropertyType DWord -Force
-ea SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate\AU' -Name 'UseWUServer' -Value 1 -PropertyType DWord -Force -ea
SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate\AU' -Name 'EnableFeaturedSoftware' -Value 1 -PropertyType DWord -
Force -ea SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate\AU' -Name 'IncludeRecommendedUpdates' -Value 1 -PropertyType DWord -
Force -ea SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate\AU' -Name 'RebootRelaunchTimeoutEnabled' -Value 1 -PropertyType DWord
-Force -ea SilentlyContinue;
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\
WindowsUpdate\AU' -Name 'RebootRelaunchTimeout' -Value 15 -PropertyType DWord -
Force -ea SilentlyContinue;