Here’s a simple collection will get you by if you need to create a collection based on the success of a Software Update deployment. For example, you’re using servicing to push out Feature Updates and want to deploy some software post devices upgrading.
select SYS.ResourceID,SYS.ResourceType,SYS.Name,SYS.SMSUniqueIdentifier,SYS.ResourceDomainORWorkgroup,SYS.Client from sms_r_system as sys inner join SMS_SUMDeploymentAssetDetails as offer on sys.ResourceID=offer.ResourceID WHERE AssignmentID = '<INSERT ASSIGNMENT ID>' AND StatusType = 1
If you’re not sure how to find the AssigmentID then you can go to the collection you have deployed against. Click the Deployments tab then right click the columns to bring up the selector. Choose AssignmentID and you’ll then see the ID listed against the deployment.
Insert your values in the fields marked with < >
Hope this helps.