Skip to content

Instantly share code, notes, and snippets.

@kkamegawa
Created February 17, 2014 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kkamegawa/9052606 to your computer and use it in GitHub Desktop.
Save kkamegawa/9052606 to your computer and use it in GitHub Desktop.
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
$AutoUpdate.Settings.save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment