How To: Create a Collection Based on an Advertisement Status

You may encounter a time when you want to target systems that reported a failure message for an advertisement, or reported a specific failure exit code. This is an example of how to create a query-based collection of all systems that reported a failure for AdvertisementID LAB20089.

SELECT sys.ResourceID,sys.ResourceType,sys.Name,sys.SMSUniqueIdentifier,sys.ResourceDomainORWorkgroup,sys.Client FROM sms_r_system as sys inner join SMS_ClientAdvertisementStatus as offer on sys.ResourceID=offer.ResourceID
WHERE AdvertisementID = 'LAB20089' and LastStateName = "Failed"

You should be able to paste this WQL directly into a new query-based membership rule, and modify the AdvertisementID for your environment.
If you have additional questions or comments, please post to this blog, or send me and email: ramseyg@hotmail.com
Published Friday, October 20, 2006 7:51 PM by gramsey
Filed under: ,

Comments

No Comments
Powered by Community Server (Commercial Edition), by Telligent Systems