→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎01-27-2016 07:26 PM
Solved! Go to Solution.
‎01-30-2016 07:25 PM
CBG-NK wrote:
Inactive users: similar to how there are reports for computers not seen in the last x-days. This is extremely helpful for maintaining a clutter-free AD.
Select Top 1000000 tblADusers.Username,
tblADusers.Userdomain,
Max(tblCPlogoninfo.logontime) As LastLogon
From tblADusers
Left Join tblCPlogoninfo On tblCPlogoninfo.Domain = tblADusers.Userdomain And
tblCPlogoninfo.Username = tblADusers.Username
Group By tblADusers.Username,
tblADusers.Userdomain
Having (Max(tblCPlogoninfo.logontime) Is Null) Or
(Max(tblCPlogoninfo.logontime) = '') Or
(Max(tblCPlogoninfo.logontime) < GetDate() -30 )
Order By tblADusers.Userdomain,
tblADusers.Username
CBG-NK wrote:
Newly created users: similar to reports for new computers found in the last x-days.
Select Top 1000000 tblADusers.Username,
tblADusers.Userdomain,
tblADusers.Firstname,
tblADusers.Lastname,
tblADusers.Name,
tblADusers.Displayname,
tblADusers.whenCreated
From tblADusers
Where tblADusers.whenCreated > GetDate() -7
Order By tblADusers.Userdomain,
tblADusers.Username
CBG-NK wrote:
Recently deleted users.
CBG-NK wrote:
Users who are members of the "Administrators" group (local machine).
‎02-01-2016 02:47 PM
‎02-01-2016 05:05 PM
CBG-NK wrote:
Oh and might as well add AD deleted computer accounts to the wishlist as well! 😄
‎02-01-2016 02:44 PM
‎01-30-2016 07:25 PM
CBG-NK wrote:
Inactive users: similar to how there are reports for computers not seen in the last x-days. This is extremely helpful for maintaining a clutter-free AD.
Select Top 1000000 tblADusers.Username,
tblADusers.Userdomain,
Max(tblCPlogoninfo.logontime) As LastLogon
From tblADusers
Left Join tblCPlogoninfo On tblCPlogoninfo.Domain = tblADusers.Userdomain And
tblCPlogoninfo.Username = tblADusers.Username
Group By tblADusers.Username,
tblADusers.Userdomain
Having (Max(tblCPlogoninfo.logontime) Is Null) Or
(Max(tblCPlogoninfo.logontime) = '') Or
(Max(tblCPlogoninfo.logontime) < GetDate() -30 )
Order By tblADusers.Userdomain,
tblADusers.Username
CBG-NK wrote:
Newly created users: similar to reports for new computers found in the last x-days.
Select Top 1000000 tblADusers.Username,
tblADusers.Userdomain,
tblADusers.Firstname,
tblADusers.Lastname,
tblADusers.Name,
tblADusers.Displayname,
tblADusers.whenCreated
From tblADusers
Where tblADusers.whenCreated > GetDate() -7
Order By tblADusers.Userdomain,
tblADusers.Username
CBG-NK wrote:
Recently deleted users.
CBG-NK wrote:
Users who are members of the "Administrators" group (local machine).
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now