SMS collection based on advertisement ID or with status

Here is the collection that gives you a list of machines with specific staus message ID:

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 = 'GSA2035F' and LastStatusMessageID = 10009

10009  is success, replace advertisementID with your advertisement ID.

With specific State name:

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 = 'KBS00289' and LastStateName = "Failed"

Below are the list of status messages with the discription:

SMS Status Message ID's.

10050 Cache too small
10061 Download failed (retrying)
10003 Failed (bad environment)
0 No messages have been received
10054 Not enough space in cache
10045 Not enough space in cache
10034 Program cancelled by user
10022 Program completed successfully (reboot pending)
10009 Program completed with success
10008 Program completed with success
10004 Program failed
10007 Program failed
10006 Program failed
10057 Program failed (download failed - content mismatch)
10053 Program failed (download failed)
10058 Program failed (download/location failure)
10051 Program failed (no content)
10071 Program failed (retrying)
10072 Program failed (retrying)
10056 Program failed (retrying)
10070 Program failed (run time exceeded)
10021 Program failed (unexpected restart)
65535 Program received - no further status
10062 Program retrying (download/location failure)
10060 Program retrying (no content)
10005 Program started
10040 Program will not rerun
10055 Retry (Bad environment)
10037 Waiting for another program
10035 Waiting for content
10036 Waiting for user condition

Leave a Reply