Old computer object in SCCM

I was working on an issue yesterday on my clients SCCM 2007 R3 server. The server showed lots of very old computer objects that were absent from the domain, and should have been deleted from the SCCM using the ‘Delete Aged Discovery Data’ maintenance task.
First, I made sure that the task was in-fact running – I opened the SQL Server Management console and run the following query on the SCCM DB:
select *,
floor(DATEDIFF(ss,laststarttime,lastcompletiontime)/3600) as Hours,
floor(DATEDIFF(ss,laststarttime,lastcompletiontime)/60)- floor(DATEDIFF(ss,laststarttime,lastcompletiontime)/3600)*60 as Minutes,
floor(DATEDIFF(ss,laststarttime,lastcompletiontime))- floor(DATEDIFF(ss,laststarttime,lastcompletiontime)/60)*60 as TotalSeconds
from SQLTaskStatus
This will show you a table containing all the Maintenance the SCCM has run and their completion status (0 means no errors).
I’ve noticed that the task was running, buy it would not delete some of the computer – some 400 orphaned computers.
I then began investigating it a bit more and I have noticed that the orphaned computers had only one agent reported on them – SMS_AD_SYSTEM_GROUP_DISCOVERY_AGENT, and its time was really old!
Agent Site[0] :      XYZ
Agent Time[0] :      10/28/2011 7:31:05 AM
To view all the computers with information like that I issued the following Query on SCCM:
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 Name in (select Name from  SMS_R_System where ((DATEDIFF(day, SMS_R_SYSTEM.AgentTime, getdate()) >=45) and AgentName = ” SMS_AD_SYSTEM_GROUP_DISCOVERY_AGENT “)) and  SMS_R_System.Client is NULL
This will show all the computers that the “SMS_AD_SYSTEM_GROUP_DISCOVERY_AGENT” last reported in over 45 days and the computer has no SCCM Client installed on.
I suggest reviewing the list and making sure that in-fact those computers are old and can be removed from SCCM, and only then removing them.

Incoming search terms:

  • sccm 2012 delete objects
  • sccm 2012 remove old computers
  • sccm2012 delete older computer objects
  • scom 2012 stale objects
  • scom old computers show up

One Comment

  1. Iˇm not certain the place you are getting your info, but good topic. I needs to spend a while finding out much more or figuring out more. Thank you for great info I used to be on the lookout for this info for my mission.

What do you think about this post?