SCCM device collection based on Domain name


This query will give you a device collection based on a domain name. It's useful in an environment where you have devices joined to multiple domains.

select 
    *  
from  
    SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId 
where 
    SMS_G_System_COMPUTER_SYSTEM.Domain = "<domain name>"


Source:
http://smsug.ca/blogs/garth_jones/archive/2009/08/28/a-collection-based-on-domain-name.aspx 
Share on Google Plus

About Tom DeMeulenaere

Highly accomplished information technology professional with extensive knowledge in System Center Configuration Manager, Windows Server, SharePoint, and Office 365.
    Blogger Comment

0 comments:

Post a Comment