Shane Corellian
posted this on October 19, 2010 22:47
From your Admin Arsenal windows select New Report... from the Reports menu and copy this SQL into the top (SQL) field. Replace the string YOURDOMAIN with your own Windows Domain name. To add additional domains, separate by commas. (e.g. WHERE LGM.UserDomain in ('YOURDOMAIN','OTHERDOMAIN','OTHERDOMAIN2').
--List of Group and User accounts in local Administrators Groups
SELECT C.Name, LGM.GroupName, LG.Description, LGM.UserDomain, LGM.UserName
FROM Computer C
INNER JOIN LocalGroupMember LGM on C.ComputerID = LGM.ComputerID
INNER JOIN LocalGroup LG ON LGM.ComputerID = LG.ComputerID
AND LGM.GroupName = LG.Name
WHERE LGM.UserDomain in ('YOURDOMAIN')
AND LG.Name = 'Administrators'
--END SQL CODE