Log an Event when an Advertisement with a Mandatory Assignment is Modified

One of our clients needed to be alerted when an advertisement with a mandatory assignment was modified.  They needed to make sure that no advertisement targeted systems during business hours.  A solution was developed where an event is logged in the application log if an advertisement with a mandatory assignment is modified.  The event description contains advertisement, collection and the start time of the scheduled assignment.  The event can be then watched by System Center Operations Manager to alert the appropriate group.

The solution is based on creating a status filter rule that runs a program.  The rule watches for message ID 30007, which is the message ID for the status message that gets created when an advertisement is modified.

For action, the rule runs a VB script that we developed.

The key for this to work is that the status filter rule passes to the script the advertisement ID.  This is done by passing one argument to the script: %msgdesc

The script uses the advertisement ID to query the SCCM database and determine if it has a mandatory assignment.  If it does, then an event is logged with a description that includes the following:

  • User who modified the advertisement
  • Advertisement ID
  • Advertisement Name
  • SCCM Program referenced by the advertisement
  • Collection ID being targeted
  • Collection name
  • Start time of scheduled assignment (if there is one)

System Center Operations Manager can then monitor the site server for this specific event and take appropriate action.



Contact Us

On Key

More Posts

Mastering Azure AD Connect - A Comprehensive Guide by WME
Active Directory

Mastering Azure AD Connect – A Comprehensive Guide

Modern businesses are fast moving toward cloud-based infrastructure. In fact, cloud-based business is not just a trend anymore but a strategic necessity. Microsoft’s Azure Active Directory (Azure AD) has become a frontrunner in this domain. It

Read More »
Security Best Practices in SharePoint
Office 365

Security Best Practices in SharePoint

Microsoft SharePoint is an online collaboration platform that integrates with Microsoft Office. You can use it to store, organize, share, and access information online. SharePoint enables collaboration and content management and ultimately allows your teams to

Read More »
The Ultimate Guide to Microsoft Intune - Article by WME
Active Directory

The Ultimate Guide to Microsoft Intune

The corporate world is evolving fast. And with that, mobile devices are spreading everywhere. As we venture into the year 2024, they have already claimed a substantial 55% share of the total corporate device ecosystem. You

Read More »
Protecting Microsoft 365 from on-Premises Attacks
Cloud Security

How to Protect Microsoft 365 from On-Premises Attacks?

Microsoft 365 is diverse enough to enrich the capabilities of many types of private businesses. It complements users, applications, networks, devices, and whatnot. However, Microsoft 365 cybersecurity is often compromised and there are countless ways that

Read More »
Be assured of everything

Get WME Services

Stay ahead of the competition with our Professional IT offerings.