none
How to create a collection based on "Days since last communications"

    Question

  • I want to create the collection based on Days Since Last Communication 

    For Example Days Since Last Communication 25 days I want those all machines one collection 

    Any one can help ?


    Best Regard's Krishna

    Thursday, July 9, 2015 9:07 AM

Answers

  • I agree with you  but If am the person the query will enough But I have different regions across AP Region. they will work on only Non-Compliance Collection only because they have certain level of access 

    It doesn't matter if you are running the query against database and you have the more flexibility with reporting to get other information about clients and accessing also. If your main criteria is to just 'get clients not communicated' from specific collection ,you can get this via SCCM Reports . If you are stick to collection query then ,the last communication info is not stored straight away in WMI (AFAIK). You must do some extra work to get the correct info or follow other methods like getting the last heartbeat discovery date /inventory data which are stored directly (straight away) in wmi.

    Eswar Koneti | Configmgr Blog: www.eskonr.com | Linkedin: Eswar Koneti | Twitter: eskonr

    Friday, July 10, 2015 10:20 AM

All replies

  • Days since last communication in Configmgr Console for any client usually refers the Current date-policy request date( as what i observed for few clients) .Lastpolicyrequest information stored in vWorkstationStatus. You may have create custom report using this view.

    report all clients on which the last communication date is more than 25 days.

    SELECT Name, LastDDR, LastPolicyRequest
    FROM  vWorkstationStatus
    GROUP BY Name, LastDDR, LastPolicyRequest
    HAVING (datediff(dd,max(vWorkstationStatus.LastPolicyRequest),getdate()-25) >0)


    Eswar Koneti | Configmgr Blog: www.eskonr.com | Linkedin: Eswar Koneti | Twitter: eskonr

    • Proposed as answer by Raman Katoch Friday, July 10, 2015 6:53 AM
    Thursday, July 9, 2015 10:14 AM
  • I agree with you but am looing to create the collection in SCCM as you aware SCCM is the WQL language So I could not able to create it 

    For Example I have India All Workstation Collection , I need to create another collection set the Limitation to India All Workstation based on LastpolicyRequeset > 25 Days 


    Best Regard's Krishna

    Thursday, July 9, 2015 10:22 AM
  • Well i would do a base line configuration that look on the client for the following reg key HKLM\SOFTWARE\Microsoft\ccm\ccmeval\LastpolicyRequeset you will see the date the agent was able to check is policy with SCCM. The issue with this is that you would have to update it every X amount of day to always make sure you are at a minimum of 25 days. If you want to make it easier make the validation via powershell that way you will be able to use things like get-date and such.

    After that you could make a collection that is base on non-compliant computers. 

    Hope this help


    Thursday, July 9, 2015 12:33 PM
  • do you have any sample?

    Best Regard's Krishna

    Thursday, July 9, 2015 1:02 PM
  • Well i would do a base line configuration that look on the client for the following reg key HKLM\SOFTWARE\Microsoft\ccm\ccmeval\LastpolicyRequeset you will see the date the agent was able to check is policy with SCCM. The issue with this is that you would have to update it every X amount of day to always make sure you are at a minimum of 25 days. If you want to make it easier make the validation via powershell that way you will be able to use things like get-date and such.

    After that you could make a collection that is base on non-compliant computers. 

    Maybe I'm missing the obvious but...

    How would this work if you care NOT talking to your MP? The results from the CI will not get sent to your MP and therefore will not update within the database.

    So how exactly do you see this working?


    Garth Jones | My blogs: Enhansoft and Old Blog site | Twitter: @GarthMJ

    Thursday, July 9, 2015 1:34 PM
  • So I have to ask, once you get this then what are you going to do with this info? Why a collection vs a report?

    Garth Jones | My blogs: Enhansoft and Old Blog site | Twitter: @GarthMJ

    Thursday, July 9, 2015 1:35 PM
  • You are right did not think about it all the way.

    Was so focus on just finding how to do a collection with the info.

    Could he just change the client status to be inactive after 25 day and make a collection with all inactive computers ?

    Thursday, July 9, 2015 1:40 PM
  • Then How you suggest to  me to reach this 

    Best Regard's Krishna

    Thursday, July 9, 2015 1:44 PM
  • Then How you suggest to  me to reach this 

    What are you trying to do with the information? Once we know what we can make a suggestion.

    Garth Jones | My blogs: Enhansoft and Old Blog site | Twitter: @GarthMJ

    Thursday, July 9, 2015 1:48 PM
  • My Goal : 

    From ABC Collection How many PC's Days Since Last Communication > 25 Days ?


    Best Regard's Krishna

    Thursday, July 9, 2015 1:50 PM
  • From ABC Collection How many PC's Days Since Last Communication > 25 Days ?

    So what is wrong with Eswar report above?

    Garth Jones | My blogs: Enhansoft and Old Blog site | Twitter: @GarthMJ

    Thursday, July 9, 2015 2:21 PM
  • Eswar provided query giving the results but I when I try to create the collection with same query getting "Synatax Error" 


    Best Regard's Krishna

    Friday, July 10, 2015 2:43 AM
  • Eswar provided query giving the results but I when I try to create the collection with same query getting "Synatax Error" 

    thats SQL Query, can be used only in reporting but not in collection (WQL). so What are you going to do with this information from collection ? You can create report using the query i provided (customize more if you need) and take it further.

    Eswar Koneti | Configmgr Blog: www.eskonr.com | Linkedin: Eswar Koneti | Twitter: eskonr

    • Proposed as answer by Raman Katoch Friday, July 10, 2015 6:52 AM
    Friday, July 10, 2015 2:55 AM
  • Eswar : My goal is to create collection of Non-Compliance that means who all are not reporting more than 25 days need to fall under ABC collection .. 

    So, The same condition, Isn't possible to  create the collection 


    Best Regard's Krishna

    Friday, July 10, 2015 4:49 AM
  • How about this query ?

    select *  from  SMS_R_System inner join SMS_G_System_SYSTEM on SMS_G_System_SYSTEM.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_CH_ClientSummary on SMS_G_System_CH_ClientSummary.ResourceID = SMS_R_System.ResourceId where SMS_G_System_CH_ClientSummary.ADLastLogonTime < "25/06/2015"

    (you can change the date in the above query)

    I am still confused with your question. You want a query to find the Non compliant clients and you also want a collection for that ?. Why not create a collection and run the query so that you get the result and later export the collection info ?


    Prajwal Desai, http://prajwaldesai.com


    Friday, July 10, 2015 5:13 AM
  • Eswar : My goal is to create collection of Non-Compliance that means who all are not reporting more than 25 days need to fall under ABC collection .. 


    That does not answer Eswar's question: why do you want to create such a collection? What will you be doing with it after it was created? Or would it be enough to create a SQL/SRS report?

    Torsten Meringer | http://www.mssccmfaq.de

    Friday, July 10, 2015 5:50 AM
    Moderator
  • I agree with you  but If am the person the query will enough But I have different regions across AP Region. they will work on only Non-Compliance Collection only because they have certain level of access 

    Since I want to create the collection based on "Days Since Last Communication " clients more than 25 days 



    Best Regard's Krishna

    Friday, July 10, 2015 6:01 AM
  • I agree with you  but If am the person the query will enough But I have different regions across AP Region. they will work on only Non-Compliance Collection only because they have certain level of access 

    Since I want to create the collection based on "Days Since Last Communication " clients more than 25 days 


    Best Regard's Krishna

    Friday, July 10, 2015 6:02 AM
  • I agree with you  but If am the person the query will enough But I have different regions across AP Region. they will work on only Non-Compliance Collection only because they have certain level of access 

    It doesn't matter if you are running the query against database and you have the more flexibility with reporting to get other information about clients and accessing also. If your main criteria is to just 'get clients not communicated' from specific collection ,you can get this via SCCM Reports . If you are stick to collection query then ,the last communication info is not stored straight away in WMI (AFAIK). You must do some extra work to get the correct info or follow other methods like getting the last heartbeat discovery date /inventory data which are stored directly (straight away) in wmi.

    Eswar Koneti | Configmgr Blog: www.eskonr.com | Linkedin: Eswar Koneti | Twitter: eskonr

    Friday, July 10, 2015 10:20 AM