This query will create an SCCM device collection from computers in an AD Organizational Unit
select SMS_R_USER.ResourceID,SMS_R_USER.ResourceType,SMS_R_USER.Name,SMS_R_USER.UniqueUserName,SMS_R_USER.WindowsNTDomain from SMS_R_User where SMS_R_User.UserOUName = "contoso.com/OU1/SubOU/Users"
Replacing the name of the OU with your own.
- Home
- Identity, Security, Access
- _Active Directory
- _BitLocker
- _Group Policy
- _SSL Certificates
- Endpoint Management
- _DNS
- _SCCM
- _SCSM
- _Windows
- _Windows Server
- Data, Messaging
- _Exchange
- _SQL Server
- _DocLink
- M365
- _Bookings
- _ClipChamp
- _Engage
- _Forms
- _Lists
- _Loop
- _M365
- _OneDrive
- _OneNote
- _Outlook
- _SharePoint
- _Teams
- _To Do
- _Visio
- _Viva
- _Whiteboard
- Development
- _Javascript
- _Power Apps
- _Power Automate
- _Power BI
- _PowerShell
- Artificial Intelligence
- _AI
- _Copilot

