myITforum and Windows IT Pro Forums

 Advertisement ID for query

Author Message
sharptech

  • Total Posts : 7
  • Scores: 0
  • Reward points : 560
  • Joined: 1/29/2014
  • Status: offline
Advertisement ID for query Wednesday, January 29, 2014 3:01 PM (permalink)
0
I am making a query for failed advertisements in SCCM 2012 per this article: http://myitforum.com/myit...pplication-deployment/
I am unable to locate the advertisement ID in SCCM 2012. In 07 this was not a problem. Can you guys let me know where the advertisement ID can be found in 2012?
Thank you
 
#1
    skissinger

    • Total Posts : 4909
    • Scores: 468
    • Reward points : 131290
    • Joined: 9/13/2001
    • Location: Sherry Kissinger
    • Status: offline
    Re:Advertisement ID for query Thursday, January 30, 2014 12:59 PM (permalink)
    0
    I think you mean assignmentid?  for applicationsDeployments? 
    Or do you really mean advertisementid, for traditional package/program/advertisements?
    mofmaster@myitforum.com
    My Blog
    Microsoft MVP - ConfigMgr
     
    #2
      sharptech

      • Total Posts : 7
      • Scores: 0
      • Reward points : 560
      • Joined: 1/29/2014
      • Status: offline
      Re:Advertisement ID for query Thursday, January 30, 2014 1:25 PM (permalink)
      0
      skissinger


      I think you mean assignmentid?  for applicationsDeployments? 
      Or do you really mean advertisementid, for traditional package/program/advertisements?

      Hi Skissinger,
      When we were using SCCM 2007 we would use the AdvertisementID. Here is the query:
      select distinct SMS_R_System.Name, SMS_R_System.Client from  SMS_R_System where SMS_R_System.ResourceId in (select ResourceID from SMS_ClientAdvertisementStatus where AdvertisementID = "Lxx204" and LastStateName = "Failed")
       
      However, in 2012 I am not able to find the AdvertisementID. These are for packages. All I need to do is find a way to identify which machines failed when deploying a package so I can create a collection and re-deploy the package to those failed computers.
       
      Thanks
       
      #3
        DanielRatliff

        • Total Posts : 12
        • Scores: 0
        • Reward points : 4960
        • Joined: 12/11/2013
        • Status: offline
        Re:Advertisement ID for query Friday, January 31, 2014 9:57 AM (permalink)
        0
        The view changed in 2012, it is now v_AdvertisementStatusInformation.
         
        #4
          sharptech

          • Total Posts : 7
          • Scores: 0
          • Reward points : 560
          • Joined: 1/29/2014
          • Status: offline
          Re:Advertisement ID for query Friday, January 31, 2014 10:42 AM (permalink)
          0
          DanielRatliff


          The view changed in 2012, it is now v_AdvertisementStatusInformation.

          Not sure what you mean. According to this article there should be a way to identify the advertisementid: http://myitforum.com/myit...pplication-deployment/
          Here is the query they are using as an example:
          For packages / task sequences:
          select SMS_R_System.ResourceId from  SMS_R_System inner join SMS_ClientAdvertisementStatus on SMS_ClientAdvertisementStatus.ResourceID = SMS_R_System.ResourceId where SMS_ClientAdvertisementStatus.AdvertisementID = “LAB20000? and SMS_ClientAdvertisementStatus.LastAcceptanceMessageIDSeverity = “3221225472?
          Change LAB20000 to the Advertisement ID of your flash deployment.
          Unless v_AdvertisementStatusInformation gives that information? Sorry I am not familiar with what that advstatusinfo is.
          Thanks
           
          #5
            DanielRatliff

            • Total Posts : 12
            • Scores: 0
            • Reward points : 4960
            • Joined: 12/11/2013
            • Status: offline
            Re:Advertisement ID for query Friday, January 31, 2014 10:43 AM (permalink)
            0
            You need to replace all instances of SMS_ClientAdvertisementStatus with v_AdvertisementStatusInformation.
             
            #6
              sharptech

              • Total Posts : 7
              • Scores: 0
              • Reward points : 560
              • Joined: 1/29/2014
              • Status: offline
              Re:Advertisement ID for query Friday, January 31, 2014 10:49 AM (permalink)
              0
              DanielRatliff


              You need to replace all instances of SMS_ClientAdvertisementStatus with v_AdvertisementStatusInformation.

              OK - what would the query looked like so that I could create a collection of devices that failed an application deployment?
              For example, as I posted previously:
              select distinct SMS_R_System.Name, SMS_R_System.Client from  SMS_R_System where SMS_R_System.ResourceId in (select ResourceID from SMS_ClientAdvertisementStatus where AdvertisementID = "LXX209XX" and LastStateName = "Failed")
              Even when I change SMS_ClientAdvertisementStatus to v_AdvertisementStatusInformation I still need a way to identify the advertisement and that it failed to create a collection of machines that failed. Does that make sense? Thanks.
               
               
              #7
                DanielRatliff

                • Total Posts : 12
                • Scores: 0
                • Reward points : 4960
                • Joined: 12/11/2013
                • Status: offline
                Re:Advertisement ID for query Friday, January 31, 2014 4:10 PM (permalink)
                0
                I see the issue now. You are using WQL, which is used in queries and collections. I was referring to SQL queries used for reporting.
                 
                You cannot query advertisement information from a WQL query and populate a collection, you need to write a SQL query or write a custom report.
                 
                 
                #8
                  sharptech

                  • Total Posts : 7
                  • Scores: 0
                  • Reward points : 560
                  • Joined: 1/29/2014
                  • Status: offline
                  Re:Advertisement ID for query Monday, February 03, 2014 7:43 AM (permalink)
                  0
                  DanielRatliff


                  I see the issue now. You are using WQL, which is used in queries and collections. I was referring to SQL queries used for reporting.

                  You cannot query advertisement information from a WQL query and populate a collection, you need to write a SQL query or write a custom report.


                  We have used and currently use these type of queries for advertisement information to populate a collection.
                   
                  #9
                    DanielRatliff

                    • Total Posts : 12
                    • Scores: 0
                    • Reward points : 4960
                    • Joined: 12/11/2013
                    • Status: offline
                    Re:Advertisement ID for query Monday, February 03, 2014 8:55 AM (permalink)
                    0
                    Then what queries are you using there?
                     
                    #10
                      sharptech

                      • Total Posts : 7
                      • Scores: 0
                      • Reward points : 560
                      • Joined: 1/29/2014
                      • Status: offline
                      Re:Advertisement ID for query Monday, February 03, 2014 9:50 AM (permalink)
                      0
                      DanielRatliff


                      Then what queries are you using there?

                      Daniel,
                      We are using WQL queries but we have used them to find the failed machines for a specific advertisement. After that then I create a collection and attach the query to it and then re-push the update to the failed devices. I guess all I need to know is if there is an advertisementid in 2012 as there was in 2007? If so, I can use the same query I have used in the past.
                       
                      #11
                        skissinger

                        • Total Posts : 4909
                        • Scores: 468
                        • Reward points : 131290
                        • Joined: 9/13/2001
                        • Location: Sherry Kissinger
                        • Status: offline
                        Re:Advertisement ID for query Monday, February 03, 2014 5:15 PM (permalink)
                        0
                        I think I know what you are asking.  I honestly have no idea if that trick--which was unsupported by the way--which used to work in SMS 2003 and CM07 will still work in CM12.
                        Keep in mind that the new "methodology" is to embrace Applications; where your detection logic is king.  If you target 10 machines with an application, and 8 out of the 10 install it successfully, and 2 fail; at their next application deployment evaluation cycle, the 8 success will evaluate as "I have it already" and the other 2 will attempt to install it.
                        So in effect, applications are what you want to go toward, to get the same (actually better) type of logic.  I understand it's a process change, and possibly a mental paradigm shift (especially for paper pushers, hoo boy we are still working through that here); but it's the way to accomplish your end goal--which is to ensure that a group of computers which is supposed to have Widgets 3.1--has Widgets 3.1
                        mofmaster@myitforum.com
                        My Blog
                        Microsoft MVP - ConfigMgr
                         
                        #12
                          sharptech

                          • Total Posts : 7
                          • Scores: 0
                          • Reward points : 560
                          • Joined: 1/29/2014
                          • Status: offline
                          Re:Advertisement ID for query Tuesday, February 04, 2014 10:51 AM (permalink)
                          0
                          Thanks skissinger,
                          I was not aware that using the query to find machines that failed the advertisement was unsupported. At this time, I am not sure if we will be moving to applications (we have moved some of our packages to apps and looking to keep doing that), but for some of our installs they are packages. I will see if there is a way I can make a query for now and in the future move to applications. Thank you for your help.
                           
                          #13
                            Online Bookmarks Sharing: Share/Bookmark

                            Jump to:

                            Current active users

                            There are 0 members and 2 guests.

                            Icon Legend and Permission

                            • New Messages
                            • No New Messages
                            • Hot Topic w/ New Messages
                            • Hot Topic w/o New Messages
                            • Locked w/ New Messages
                            • Locked w/o New Messages
                            • Read Message
                            • Post New Thread
                            • Reply to message
                            • Post New Poll
                            • Submit Vote
                            • Post reward post
                            • Delete my own posts
                            • Delete my own threads
                            • Rate post

                            2000-2014 ASPPlayground.NET Forum Version 3.9