BREAKING NEWS

Thursday, November 13, 2014

How To: Create a Collection Based on an Advertisement Status

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"
Replace the AdvertisementID = 'LAB20089' with the ID you wish to create the collection based upon.
You should be able to paste this WQL directly into a new query-based membership rule, and modify the AdvertisementID for your environment.

Share this:

Post a Comment

 
Back To Top
Copyright © 2014 Unrevealing Box .