‎08-07-2013 08:50 PM
Solved! Go to Solution.
‎08-09-2013 06:26 PM
Select Top 1000000 tblADusers.Username,
tblADusers.Userdomain,
SubQuery1.Lastlogon
From tblADusers
Left Join (Select Top 1000000 tblCPlogoninfo.Username,
tblCPlogoninfo.Domain As Userdomain,
Max(tblCPlogoninfo.logontime) As Lastlogon
From tblCPlogoninfo
Group By tblCPlogoninfo.Username,
tblCPlogoninfo.Domain) SubQuery1 On SubQuery1.Username = tblADusers.Username
And SubQuery1.Userdomain = tblADusers.Userdomain
Where (SubQuery1.Lastlogon Is Null) Or
(SubQuery1.Lastlogon < GetDate() - 90)
Order By tblADusers.Userdomain,
tblADusers.Username
‎03-26-2014 09:53 PM
Lansweeper wrote:
Lansweeper does not store an AD user's status (enabled/disabled) in the database, so you cannot include this information in your reports.
‎08-09-2013 06:26 PM
Select Top 1000000 tblADusers.Username,
tblADusers.Userdomain,
SubQuery1.Lastlogon
From tblADusers
Left Join (Select Top 1000000 tblCPlogoninfo.Username,
tblCPlogoninfo.Domain As Userdomain,
Max(tblCPlogoninfo.logontime) As Lastlogon
From tblCPlogoninfo
Group By tblCPlogoninfo.Username,
tblCPlogoninfo.Domain) SubQuery1 On SubQuery1.Username = tblADusers.Username
And SubQuery1.Userdomain = tblADusers.Userdomain
Where (SubQuery1.Lastlogon Is Null) Or
(SubQuery1.Lastlogon < GetDate() - 90)
Order By tblADusers.Userdomain,
tblADusers.Username
‎03-26-2014 05:34 PM
Lansweeper wrote:
You can try the report below to list users:
- For whom no logon events have been detected.
- For whom the most recently detected logon occurred more than 90 days ago.Select Top 1000000 tblADusers.Username,
tblADusers.Userdomain,
SubQuery1.Lastlogon
From tblADusers
Left Join (Select Top 1000000 tblCPlogoninfo.Username,
tblCPlogoninfo.Domain As Userdomain,
Max(tblCPlogoninfo.logontime) As Lastlogon
From tblCPlogoninfo
Group By tblCPlogoninfo.Username,
tblCPlogoninfo.Domain) SubQuery1 On SubQuery1.Username = tblADusers.Username
And SubQuery1.Userdomain = tblADusers.Userdomain
Where (SubQuery1.Lastlogon Is Null) Or
(SubQuery1.Lastlogon < GetDate() - 90)
Order By tblADusers.Userdomain,
tblADusers.Username
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now