Created
February 17, 2014 15:26
-
-
Save kkamegawa/9052606 to your computer and use it in GitHub Desktop.
Setting Windows Update timing for PowerShell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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