Script to set ConfigMgr Client's 'Install required updates on a schedule'

This came out of the SDK:

on error resume next
'From ConfigMgr07 SDK
'Parameters:
'First parameter is the day
'0=none, 1=Sunday, 2=Monday, 3=Tuesday, 4=Wednesday
'5=Thursday, 6=Friday, 7=Saturday, 8=Daily
'2nd Paramter is the time, 0 through 23
newRecurrence = wscript.arguments(0)
newHour = wscript.arguments(1)
set updatesDeployment = CreateObject ("UDA.CCMUpdatesDeployment")
updatesDeployment.SetUserDefinedSchedule newRecurrence, newHour
wscript.quit

As examples, NameOfTheScript.vbs 8 03 would be Daily, 3 am.  NameOfTheScript.vbs 7 23 would be Saturdays, 11 p.m.  If you need to disable the schedule, it's NameOftheScript.vbs 0

If you look at a client, their local Configuration Management applet, on the Updates tab an individual could set a schedule.  This script allows you to set that schedule via a vbscript advertisement.  I'm hoping (still haven't sent this to production yet, so YMMV) that by implementing this script I can appease the conflicting requirements of allowing for long periods before Software Updates are required, yet set installation times for different computers based on roles and get to 97% hotfix deployment quickly.

Published Wednesday, August 13, 2008 6:11 AM by skissinger

Comments

No Comments