Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Setting Windows Update timing for PowerShell
$AutoUpdate = new-object -ComObject "Microsoft.Update.AutoUpdate"
# 4 is Scheduled Install
# Be carefull.If you enabled Group Policy when setting NotificationLevel is abort.
$AutoUpdate.Settings.NotificationLevel = 4
# 0 is EveryDay
$AutoUpdate.Settings.ScheduledInstallationDay = 0
# 0 is 0:00 AM
$AutoUpdate.Settings.ScheduledInstallationTime = 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment