Hey all;
So we are trying to create a report of machines where the domain admins group isnt a member of the local administrators group. We can create the positive result on this query below but how do we get the other result we want, I am aware that we might get nulls since maybe the machine isnt scanned or we cant because of access right's
SELECT TOP (10000000) dbo.tblcomputers.ComputerUnique, dbo.tblUsersInGroup.Computername, dbo.tblUsersInGroup.Groupname, dbo.tblUsersInGroup.Domainname,
dbo.tblUsersInGroup.Username, dbo.tblUsersInGroup.Lastchanged
FROM dbo.tblUsersInGroup INNER JOIN
dbo.tblcomputers ON dbo.tblUsersInGroup.Computername = dbo.tblcomputers.Computername
WHERE (dbo.tblUsersInGroup.Username = 'domain admins') AND (dbo.tblUsersInGroup.Groupname = 'administrators')
ORDER BY dbo.tblUsersInGroup.Computername