Comments on: SCCM Domain Controllers Collection Query https://www.prajwaldesai.com/sccm-domain-controllers-collection-query/ SCCM | ConfigMgr | Intune | Windows 11 | Azure Sat, 27 Mar 2021 16:44:48 +0000 hourly 1 https://wordpress.org/?v=6.4.1 By: Doug Jacobson https://www.prajwaldesai.com/sccm-domain-controllers-collection-query/#comment-23257 https://www.prajwaldesai.com/?p=217831#comment-23257 To collect both domain controllers and read-only domain controllers. Add the (or SMS_R_System.PrimaryGroupID = “521”) to the end as 521 is the PrimaryGroupID for the Active Directory “Read-only Domain Controllers” group.

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 SMS_R_System.PrimaryGroupID = “516” or SMS_R_System.PrimaryGroupID = “521”

]]>
By: George Stamatopoulos https://www.prajwaldesai.com/sccm-domain-controllers-collection-query/#comment-17181 https://www.prajwaldesai.com/?p=217831#comment-17181 Hi
By the location in AD is cute (Domain Controllers OU), but by service is more professional.
… where SMS_G_System_COMPUTER_SYSTEM.Roles like “%Domain_Controller%”
and this one also
… where SMS_G_System_SERVER_FEATURE.Name like “Active Directory Domain Services”

]]>