Discovery Date RRS feed

  • Question

  • Hello,

    I am looking for the date a machine is discovered by SCCM so I could plan the technician to install application (including SCCM Agent) and start doing the first inventory HW & SW on them.

    I tried several queries but none match the reality:

    select v_R_SYSTEM.ResourceID,v_R_SYSTEM.ResourceType,v_R_SYSTEM.Name0,v_R_SYSTEM.SMS_Unique_Identifier0, v_R_SYSTEM.Resource_Domain_OR_Workgr0,v_R_SYSTEM.Client0 from v_R_System where ((DATEDIFF(hh, v_R_SYSTEM.AgentTime, getdate()) < 23) and AgentName = "SMS_AD_SYSTEM_DISCOVERY_AGENT") and (v_R_System.Client_Version0 is null) --------------------------------------------------------------------------------------------------------------- this one I have to find out the agenttime and agentname as they are not in the v_R_System --------------------------------------------------------------------------------------------------------------- select v_R_System_Valid.ResourceID, v_R_System_Valid.Netbios_Name0, v_R_System.SMS_UUID_Change_Date0 from v_R_System_Valid inner join v_R_System on v_R_System.ResourceID = v_R_System_Valid.ResourceID where DATEDIFF(mm, v_R_System.SMS_UUID_Change_Date0, GETDATE()) <= 1 ---------------------------------------------------------------------------------------------------------------

    This one is giving 21,327 and 302 for 1 day more realistic...but still higher than the real addition... --------------------------------------------------------------------------------------------------------------- -- Also for day based use DATEDIFF(dd, v_R_System.SMS_UUID_Change_Date0, GETDATE()). --------------------------------------------------------------------------------------------------------------- this one is giving 21,327 machines for last month this is out-of-range... --------------------------------------------------------------------------------------------------------------- select v_R_System.Name0, v_R_System.Creation_Date0 FROM v_R_System WHERE DateDiff(dd,v_R_System.Creation_Date0, GetDate ()) <= 1 --------------------------------------------------------------------------------------------------------------- This is as 133 in results which looks more realistic...

    Any other idea?


    Security / System Center Configuration Manager Current Branch / SQL

    • Edited by Felyjos Friday, February 8, 2019 2:05 AM
    Friday, February 8, 2019 12:28 AM


  • Hello Dom,
    The AgentTime shows the latest discovery dates for the resource. You can match the values after "AgentTime" with Agent Name and see which discovery method was used.
    The SMS_UUID_Change_Date shows when the SMSID is changed. It could be caused by the first discovery, or Smbios serial number/Machine SID/Hardware id is changed.
    The Creation_Date shows the date when the resource was created in the ConfigMgr DB.
    In summary, Creation_Date is most likely to give you what you want.
    Hope my answer could help you and look forward to your feedback.
    Best Regards,

    Please remembers to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Marked as answer by Felyjos Monday, April 15, 2019 9:44 PM
    Monday, February 11, 2019 10:37 AM