Close Menu
    Facebook X (Twitter) Instagram
    Friday, May 16
    X (Twitter) LinkedIn
    All about Endpoint Management
    • Home
    All about Endpoint Management
    Home»Collections»SCCM Collection based on advertisement status or Status Messege ID’s

    SCCM Collection based on advertisement status or Status Messege ID’s

    Eswar KonetiBy Eswar KonetiJanuary 10, 2:21 pm2 Mins Read Collections 15,464 Views
    Share
    Facebook Twitter LinkedIn Reddit

    this post is just to make the application deployment easier.when you deploy any application to a collection,you might see faliure,no status and waiting.I had similar issues(number count was more).This collection gives you list of systems with faliure/no status/waiting status for particular advertisement.if you need more ,just customise it.

    Collection:

    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 = 'KBS20326' and (LastStateName = "Failed" or LastStateName='Waiting' or LastStateName='No status') and sys.Name like "US_%"

    Where KBS20326 is advertisement ID ,just replace it with your ID.once you are ready with this collection,you can simply advertise it and get the better success rate,if you still have less success rate,get more into troubleshooting on the web 🙂

    You can also create a collection based on the statusmessge IDS which can be obtained from sitesystem-->Advertisement status

    Collection for Computers where particualr advertisement is not succeded with  status messgae ID's.

    select SMS_R_SYSTEM.ResourceID not in (select SMS_ClientAdvertismentStatus.ResourceID from SMS_ClientAdvertisementStatus where SMS_ClientAdvertisementStatus.AdvertisementID = "KBS2035F" and SMS_ClientAdvertisementStatus.laststatusmessageID in (10009)")

    Where 10009 is success state.The above collection will gives you list of computer which are not succeded.

    With succeded state:

    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 = ‘KBS2035F’ and LastStatusMessageID = 10009

    Below are the list of SMS/SCCM 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 status collections advertisement status messge IDs Collections SCCM SCCM 2007 sccm collection based on the advertisement status SCCM Reports status message IDs collections
    Share. Twitter LinkedIn Email Facebook Reddit

    Related Posts

    Optimize Your Intune Workflow with a Powerful Browser Extension

    March 22, 10:39 am

    Migrate Microsoft 365 Updates from SCCM/MECM to Intune for Co-Managed Devices

    February 11, 9:50 pm

    Investigating Co-Management Issues with Windows Endpoints in SCCM/Intune

    October 26, 10:45 pm

    4 Comments

    1. Swath on January 30, 2024 11:20 AM

      10003 Failed (bad environment) please suggest me to fix this issue in package deployment

      Reply
    2. mattmn on April 28, 2017 10:45 PM

      Worked perfectly! Make sure to change the quotation marks.

      Reply
    3. surendran on May 12, 2013 12:22 PM

      unable to deploy package, Program failed (run time exceeded

      Pls let me know how to fix this issue

      Regards,
      surendrank

      Reply
      • Eswar Koneti on May 14, 2013 3:59 PM

        run time exceeded ? check the time used in program properties.You should calculate the time require to finish the installation of package.
        check execmgr.log as well for more information.

        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.