AD WMI Query

The below is a wmi query that is used to form a user collection based on a group inside AD..

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.SecurityGroupName = "DOMAIN\\OU"

Some handy little script. 🙂

Kieren