cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Mowi
Engaged Sweeper
First let me apologize for asking such a fundamental question.
I have setup my scanning targets correctly so I only see "my machines and users"
However all reports are not filtered and I get results for all machines and users

Is there a way to limit the results?
E.G. We have AD folders for each Business Unit so I only want to see users with no department in my home folder


Thanks in advance for helping out a newbie.
1 ACCEPTED SOLUTION
Susan_A
Lansweeper Alumni
AD user attributes are stored in the tblADusers database table and AD computer attributes in tblADcomputers. Below is a sample report that lists users with no department and in a specific OU. (Highlighted part to be replaced.) The Lansweeper report builder is a SQL editor, so the below is standard SQL syntax.

If you only want to scan and pull certain OUs into your installation though, I would also double-check that your scanning targets are configured as such under Scanning\Scanning Targets and delete any unwanted machines that have already been scanned.
Select Top 1000000 tblADusers.Username,
tblADusers.Userdomain,
tblADusers.Displayname,
tblADusers.Department,
'usersm.gif' As icon,
tblADusers.OU,
tblADusers.Lastchanged
From tblADusers
Where (tblADusers.Department = '' Or tblADusers.Department Is Null)
And tblADusers.OU = 'OU=TestOU,DC=TEST,DC=local'
Order By tblADusers.Username

View solution in original post

1 REPLY 1
Susan_A
Lansweeper Alumni
AD user attributes are stored in the tblADusers database table and AD computer attributes in tblADcomputers. Below is a sample report that lists users with no department and in a specific OU. (Highlighted part to be replaced.) The Lansweeper report builder is a SQL editor, so the below is standard SQL syntax.

If you only want to scan and pull certain OUs into your installation though, I would also double-check that your scanning targets are configured as such under Scanning\Scanning Targets and delete any unwanted machines that have already been scanned.
Select Top 1000000 tblADusers.Username,
tblADusers.Userdomain,
tblADusers.Displayname,
tblADusers.Department,
'usersm.gif' As icon,
tblADusers.OU,
tblADusers.Lastchanged
From tblADusers
Where (tblADusers.Department = '' Or tblADusers.Department Is Null)
And tblADusers.OU = 'OU=TestOU,DC=TEST,DC=local'
Order By tblADusers.Username