cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
MF_IT
Engaged Sweeper
Hi all,

I built a report to get all users in a certain OU. Somehow Lansweeper shows users in that report that have been deleted months ago - while Lansweeper was set up just weeks ago.
Also, these users are not in the AD recycle bin anymore.
I would like to know where these users come from?

Thats how my report looks like:

Select Top 1000000 tblADusers.Username,
tblADusers.Userdomain,
tblADusers.Firstname,
tblADusers.Lastname,
tblADusers.Name,
tblADusers.Displayname,
tblADusers.Description,
tblADusers.Office,
tblADusers.Telephone,
tblADusers.Fax,
tblADusers.Mobile,
tblADusers.Street,
tblADusers.City,
tblADusers.C,
tblADusers.Zip,
tblADusers.Country,
tblADusers.Countrycode,
tblADusers.UPN,
tblADusers.Title,
tblADusers.Department,
tblADusers.Company,
tblADusers.email,
tblADusers.OU,
tblADusers.Picture,
tblADusers.HomePhone,
tblADusers.Pager,
tblADusers.IpPhone,
tblADusers.State,
tblADusers.HomePage,
tblADusers.HomeDirectory,
tblADusers.ProfilePath,
tblADusers.LogonScript,
tblADusers.whenCreated,
tblADusers.whenChanged,
tblADusers.EmployeeID,
tblADusers.EmployeeNumber,
tblADusers.EmployeeType,
tblADusers.Info,
tblADusers.Division,
tblADusers.Lastchanged
From tblADusers
Where tblADusers.Username Like 'username%' And tblADusers.OU Not Like
'%OU=test%'
Order By tblADusers.Userdomain,
tblADusers.Username
1 ACCEPTED SOLUTION
JacobH
Champion Sweeper III
It comes from configuration > server options > history cleanup options, which gives you the following options:

Remove Users not found in Active Directory from the Lansweeper Database

Remove users disabled in Active Directory from the Lansweeper Database

Refresh Active Directory user details (Department, telephone...) in the Lansweeper Database



Hope that helps

View solution in original post

3 REPLIES 3
JacobH
Champion Sweeper III
No problem glad you got it working! I struggle with checking those boxes or not... as I like historical information, and to report on those old accounts still being logged on somewhere... and regardless of whomever makes the AD policy (i.e. to keep the users in a 'disabled users' OU or something, or to delete disabled after 90 days, etc...), I can keep that information in LS in case someone needs it sometime in the future...

MF_IT
Engaged Sweeper
Thank you so much!
JacobH
Champion Sweeper III
It comes from configuration > server options > history cleanup options, which gives you the following options:

Remove Users not found in Active Directory from the Lansweeper Database

Remove users disabled in Active Directory from the Lansweeper Database

Refresh Active Directory user details (Department, telephone...) in the Lansweeper Database



Hope that helps