I found this handy bit of code, to suppress a task sequence notifications for an advertised task sequence. This can be particularly useful if you want to pre-stage computers with an OSD task sequence, but you don’t want users knowing about it and accidentally kicking off their own builds. This VBScript needs to be run on the server, as an administrator. Replace the strTSID number with the number of your own Task Sequence that you want to suppress notifications for. In this example, the task sequence ID is SCM00001. This bit of code can take a couple of minutes to complete, so be paitent.
strSMSServer = “.”strTSID = “SCM00001″
Set objLocator = CreateObject(“WbemScripting.SWbemLocator”)
Set objSCCM = objLocator.ConnectServer(strSMSServer, “rootsms”)
Set Providers = objSCCM.ExecQuery(“SELECT * From SMS_ProviderLocation WHERE ProviderForLocalSite = true”)
ForEach Provider in Providers
If Provider.ProviderForLocalSite = TrueThen
Set objSCCM = objLocator.ConnectServer(Provider.Machine, “rootsmssite_” & Provider.SiteCode)
EndIf
Next
Set objProgram = objSCCM.Get(“SMS_TaskSequencePackage.PackageID=’” & strTSID & “‘”)
ProgramFlags = objProgram.ProgramFlags
WScript.Echo
“Flag for “ & strTSID & ” currently set to “ & ProgramFlags
WScript.Echo “Adding 0×00000400 (COUNTDOWN. The countdown dialog is not displayed)”‘ see ConfigMgr SDK for details (“SMS_Program Server WMI Class”)
ProgramFlags = ProgramFlags + 1024
WScript.Echo
“Set flag to: “ & ProgramFlags
objProgram.ProgramFlags = ProgramFlags
objProgram.Put_