In my previous post,we saw how to create SCCM report to list clients with its heartbeat time stamp . In this post ,we are going to see ,how to create Create a collection to list clients that are not sending or not reported to SCCM since X days based on its heartbeat (DDR) agent time.
To get clients that are not sending heartbeat DDR ,we will use sub selected query which means ,we first create collection that list all clients have heartbeat DDR < 23 days and use this in subselected query to list clients that are not in first created query. Entire query can be put into one collection which is given below.
Create a collection ,choose new query based and paste the following query init.
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.ResourceId not in (select ResourceID from SMS_R_System where AgentName in ("Heartbeat Discovery") and DATEDIFF(day,AgentTime,GetDate())<23)
You can replace the number of days and agent name as you need in the above query.
Is there a way to modify this so that you can find all active machines missing a client?
If the machine is active means it has client .What do you mean by active here ? does this refer to SCCM client status active ?
This query takes all Agent Times into consideration, not just Heartbeat Discovery, how to just filter by Heartbeat Discovery Agent Time?
i just tried the query ,it takes only the heartbeat discovery time. can you post the results what you see that tell all agent time?
hi, what should i put in agent name?
i keep getting invalid query error.
did you try replacing the quotes"" in heartbeat discovery used in the query.they converted to fancy quotes by the blog.