![]() ![]() $objAutoUpdateSettings.ScheduledInstallationTime = $ScheduledInstallationTime $objAutoUpdateSettings.ScheduledInstallationDay = 0 $objAutoUpdateSettings.NotificationLevel = $NotificationLevel $objAutoUpdateSettings = (New-Object -ComObject "").Settings Write-Host -NoNewLine ("Microsoft AutoUpdate settings on " + $env:COMPUTERNAME + " after update by this script:") ValueFromPipelineByPropertyName = $true)] If you want to use other values, you’ll need to modify them in the script. It even creates a local policy registry key to set NoAutoReboot. Important The script sets most Windows Update settings to hard-coded values. You’ll need to set the group policy items to Not Configured to allow the script to make changes. Note that the script will not work if you controlling Windows Update through group policy. ![]() The script displays the settings in effect after they have been changed. In my case, to enforce a download window of 3:00 to 7:00am, I set the NotificationLevel to 4 at 3:00am, then back to 2 at 7:00am. The script requires one numeric parameter for NotificationLevel:Ģ – Check for updates but let me choose whether to download and install themģ – Download updates but let me choose whether to install them What if you want to change the settings? In particular, I needed to be able to use MAXfocus Site Automated Tasks to change the NotificationLevel so I could control when downloads and updates happen. I’ve already posted a script to show Windows Update settings. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |