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

About Greg Ramsey
Greg Ramsey, Enterprise Mobility MVP, is a Senior Enterprise Architect at Dell Technologies. He has a B.S. in Computer Sciences and Engineering from Ohio State University and has co-authored many books over the years. Greg is an international speaker, a board member of the Northwest System Center User Group, and the Director of Communications for the Midwest Management Summit.

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

  1. Pingback: How To: Enable the “Suppress Program Notifications” Checkbox for all Programs in a Package « Greg's Systems Management Blog

  2. Rob Szar says:

    nice! thanks Greg.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: