How To: Enable the “Suppress Program Notifications” Checkbox for Program Properties

After rebuilding our ConfigMgr 2012 site to RC2, we had to run the Migration Tool to migrate Packages from ConfigMgr 2007. One of the site-wide settings that we took advantage of in ConfigMgr 2007 was to hide the “New Program is Available” systray notification. This works slightly different in ConfigMgr 2012, so we had to enable this checkbox for all programs. We’ll save the details on ConfigMgr systray notifications for a separate post, but for now, here’s a quick PowerShell script to enable the “Suppress program notifications” checkbox for every program in  your ConfigMgr 2012 (or ConfigMgr 2007) environment.

(mouse over code and click the “view source” icon to copy the code)

#Select all programs (Update MySiteServer and LAB with your ConfigMgr Server name and Site code)
$prgs = get-wmiobject sms_program -computername MySiteServer -namespace root\sms\site_LAB
$prgs | foreach {
#ProgramFlags are a lazy property, so make explicit call.
$prg = [wmi] $_.__Path
if ($prg.ProgramFlags -band ([math]::pow(2,10)))
{
# Suppress already enabled
}
else
{
# Not suppressed - display programname and packageID
$prg.Programname + "`t" + $prg.PackageiD
# flip the programflags bit to enable suppression
$prg.ProgramFlags = $prg.ProgramFlags -bor ([math]::pow(2,10))
# use Put to save changes
$prg.put()
}
#rinse and repeat
}

Read more about SMS_Program and ProgramFlags.

Greg

System Center Universe Next Week!

I just wanted to give a BIG THANKS to Catapult Systems for organizing System Center Universe! I recognize there’s a lot of time and effort that goes into the planning of this kind of event.  I’m thankful that I get to attend in person – so if you’re there, let’s be sure to meet up.

It’s also great how Catapult has reached out to the user groups around the world – take a look at the list of user groups on this page:  http://www.systemcenteruniverse.com/UserGroupViewings. The simulcast is free, so find your nearest user group and register. Also, if you haven’t yet joined a user group, please do! You will be amazed at the amount of knowledge transfer, personal friendships and professional networking that occurs through user groups.

And if you’re reading this blog, you probably already know about myITforum, but just in case you haven’t, link over there now and start drinking from the fire hose.

One final note, be sure to keep an eye on www.ctsmug.org next week – you may find a link for watching additional deep dives into ConfigMgr 2012 from our user group meetings on Jan 18th and 20th.

Greg