Close Menu
    Facebook X (Twitter) Instagram
    Sunday, July 20
    X (Twitter) LinkedIn
    All about Endpoint Management
    • Home
    All about Endpoint Management
    Home»Collections»SMS collection based on advertisement ID or with status

    SMS collection based on advertisement ID or with status

    Eswar KonetiBy Eswar KonetiSeptember 15, 1:30 pm2 Mins Read Collections 3,630 Views
    Share
    Facebook Twitter LinkedIn Reddit

    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

    advertisement ID Advertisement staus collection based on advertisement status collection with status ID sccm collection sccm collecttions SMS collection based on advertisement ID or with status
    Share. Twitter LinkedIn Email Facebook Reddit

    Related Posts

    SCCM report list collections with no deployments

    December 05, 12:04 pm

    Tool for managing the import and export of SSRS report – ReportSync Tool

    October 27, 9:10 pm

    Investigating SCCM Client Policy Request and Communication Status with a Collection Specific Report

    October 15, 11:22 pm

    4 Comments

    1. Erhan Acik on September 22, 2022 4:16 PM

      I couldn't find anything called an advertisement ID anywhere on SCCM.
      I am using version 2207.

      Reply
      • Eswar Koneti on October 16, 2022 8:26 PM

        Hi,
        The article was written in 2009 and it was during SCCM 2007 version.
        Advertisements is only applicable for packages (legacy) and for applications, it is no more advertisements, it is deployment types . Deployment types has its own wmi instances.
        If you are looking for advisement ID for packages ONLY, the collection query is still valid.

        Thanks,
        Eswar

        Reply
    2. Ken Thompson on June 21, 2019 3:10 AM

      Is Advertisement ID the same as Deployment ID? I'm trying to create a collection for a specific package deployment consisting of all deployments that failed with Message ID 10057.

      Reply
      • Eswar Koneti on July 4, 2019 4:00 PM

        Hi Ken,
        You can get the advertisement ID in the deployments section in monitoring node.

        Thanks,
        Eswar

        Reply

    Leave a ReplyCancel reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Sign Up

    Get email notifications for new posts.

    Author

    I’m Eswar Koneti ,a tech enthusiast, security advocate, and your guide to Microsoft Intune and Modern Device Management. My goal? To turn complex tech into actionable insights for a streamlined management experience. Let’s navigate this journey together!

    Support

    Awards

    Archives

    © Copyright 2009-2024 Eswar Koneti, All rights reserved.

    Type above and press Enter to search. Press Esc to cancel.