WQL query on SCCM - get computers from AD users group

WW-6729 371 Reputation points
2022-04-01T09:32:04.287+00:00

Hi!

I need WQL query that I will run on SCCM that will give me computers from AD users group. Is it possible to do that?

Thank you!

BR

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,127 questions
Windows Server Infrastructure
Windows Server Infrastructure
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Infrastructure: A Microsoft solution area focused on providing organizations with a cloud solution that supports their real-world needs and meets evolving regulatory requirements.
514 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. WW-6729 371 Reputation points
    2022-04-04T07:34:31.72+00:00

    If anyone needs solution, this will get the info needed:

    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, SMS_R_User.UniqueUserName
    FROM SMS_R_System
    JOIN SMS_UserMachineRelationship ON SMS_R_System.Name=SMS_UserMachineRelationship.MachineResourceName
    JOIN SMS_R_User ON SMS_UserMachineRelationship.UniqueUserName=SMS_R_User.UniqueUserName
    Where SMS_R_User.UniqueUserName in (select UniqueUserName from SMS_R_User where UserGroupName = "domain\AD_group")

    BR

    0 comments No comments