SCCM Newly Discovered Devices: SQL Query for the Last 24 Hours

SQL Query: Devices Discovered by Configuration Manager in the Last 24 Hours If you want to keep an eye on new devices as they get discovered by Configuration Manager — useful for spotting unexpected or unauthorised devices appearing on your network early — this SQL query lists everything discovered within the last day: SELECT SMS_R_System.Name, […]

SCCM SQL Query For Newly Discovered Devices In Last 24 Hours

SQL Query: Devices Discovered by Configuration Manager in the Last 24 Hours

If you want to keep an eye on new devices as they get discovered by Configuration Manager — useful for spotting unexpected or unauthorised devices appearing on your network early — this SQL query lists everything discovered within the last day:
SELECT SMS_R_System.Name, SMS_R_System.CreationDate
FROM SMS_R_System
WHERE DateDiff(dd, SMS_R_System.CreationDate, GetDate()) <= 1
To look further back than 24 hours, change the 1 at the end to however many days you want to check — for example <= 7 for the last week. Build this as a saved query or an SSRS report if you want to check it regularly, and consider scheduling it to run daily and alert you (via an SSRS subscription, for example) rather than remembering to check it manually. Bear in mind this reflects when Configuration Manager’s discovery methods first created the resource record, which depends on your discovery method schedules (Active Directory System Discovery, Heartbeat Discovery, and so on) — a device that exists on your network but hasn’t yet been picked up by a discovery cycle won’t show here until it has been.

Still Current on Configuration Manager 2603 (Updated for 2026)

This query is unchanged on the current release of Configuration Manager (2603, generally available 27 May 2026) — SMS_R_System.CreationDate and the underlying discovery-record behaviour work exactly as described above on the current version. A couple of practical notes worth adding: pair this with SMS_R_System.Client in your SELECT to see at a glance whether a newly-discovered device has actually had the Configuration Manager client installed yet, since discovery and client installation are separate processes and a device can sit “discovered but clientless” for a while. If you’re using this for security monitoring specifically, also cross-reference results against your network access control / DHCP lease logs — Configuration Manager discovery only tells you what your existing discovery methods found, not every device that touched the network.

Resources

🛠️

Gear We Recommend

Testing configs is easier with a dedicated admin machine set up right. Here’s the kit we use.

Browse our Windows Admin Toolkit picks on Amazon

As an Amazon Associate, TechyGeeksHome earns from qualifying purchases.


Discover more from TechyGeeksHome

Subscribe to get the latest posts sent to your email.

Andrew Armstrong

Andrew Armstrong is a UK-based IT professional with 26+ years of hands-on experience in Windows, Windows Server, SCCM/ConfigMgr, Active Directory, PowerShell, and enterprise infrastructure.

He founded TechyGeeksHome in 2010 and has published over 1,500 practical guides covering real-world IT problems and solutions. When not solving IT problems,

Andrew develops free Windows utilities including Ultimate Settings Panel, which has been downloaded over 850,000 times.

13 thoughts on “SCCM Newly Discovered Devices: SQL Query for the Last 24 Hours

  1. Awesome, works great. I needed this to track techs not using the most current image we recently created. Thanks,

  2. Awesome, works great. I needed this to track techs not using the most current image we recently created. Thanks,

  3. Awesome, works great. I needed this to track techs not using the most current image we recently created. Thanks,

  4. Try this:

    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 DateDiff(dd,SMS_R_System.CreationDate, GetDate ()) <= 1

  5. 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 DateDiff(dd,SMS_R_System.CreationDate, GetDate ()) <= 1

  6. Try this:

    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 DateDiff(dd,SMS_R_System.CreationDate, GetDate ()) <= 1

  7. 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 DateDiff(dd,SMS_R_System.CreationDate, GetDate ()) <= 1

  8. Try this:

    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 DateDiff(dd,SMS_R_System.CreationDate, GetDate ()) &#60= 1

  9. 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 DateDiff(dd,SMS_R_System.CreationDate, GetDate ()) &#60= 1

Comments are closed.