→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎09-07-2016 07:53 PM
Select Distinct Top 1000000 tblADusers.Username,
tblADusers.Name,
tblADusers.OU,
tblADGroups.Name As [Group],
(Case
When tblADGroups.Name = 'InternalScreenLock'
Then 'internal'
When tblADGroups.Name = 'ExternalScreenlock'
Then 'External'
Else 'Not assigned'
End) As ScreenLock
From tblADGroups
Inner Join tblADMembership On tblADMembership.ParentAdObjectID =
tblADGroups.ADObjectID
Inner Join tblADusers On tblADMembership.ChildAdObjectID =
tblADusers.ADObjectID
Solved! Go to Solution.
‎09-15-2016 08:39 PM
Select Top 1000000 tblADusers.Userdomain,
tblADusers.Username,
tblADusers.Name,
tblADusers.OU
From tblADusers
Where tblADusers.ADObjectID Not In (Select tblADMembership.ChildAdObjectID
From tblADMembership Inner Join tblADGroups On tblADGroups.ADObjectID =
tblADMembership.ParentAdObjectID
Where (tblADGroups.Name = 'InternalScreenLock') Or
(tblADGroups.Name = 'ExternalScreenlock'))
‎09-15-2016 09:15 PM
‎09-15-2016 08:39 PM
Select Top 1000000 tblADusers.Userdomain,
tblADusers.Username,
tblADusers.Name,
tblADusers.OU
From tblADusers
Where tblADusers.ADObjectID Not In (Select tblADMembership.ChildAdObjectID
From tblADMembership Inner Join tblADGroups On tblADGroups.ADObjectID =
tblADMembership.ParentAdObjectID
Where (tblADGroups.Name = 'InternalScreenLock') Or
(tblADGroups.Name = 'ExternalScreenlock'))
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now