Notification

Icon
Error

Limit reports to AD folder - Reports are including all AD folders

Posted: Wednesday, June 5, 2019 6:47:05 PM(UTC)
Mainiac

Mainiac

Member Original PosterPosts: 1
0
Like
This issue has been solved! Click here to view the solution
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.
Susan.A
#1Susan.A Member Administration Posts: 1,535  
posted: 6/7/2019 7:05:03 AM(UTC)
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.
Code:
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 = '[h]OU=TestOU,DC=TEST,DC=local[/h]'
Order By tblADusers.Username

Active Discussions

Lansweeper How to modify scan schedule for multiple scanning targets?
by  aturkovich   Go to last post Go to first unread
Last post: Yesterday at 3:46:04 PM(UTC)
Lansweeper Changing/Editing tblComputerSystem.DomainRole
by  Esben.D  
Go to last post Go to first unread
Last post: Yesterday at 2:41:17 PM(UTC)
Lansweeper Version Check Page
by  Esben.D   Go to last post Go to first unread
Last post: Yesterday at 2:37:43 PM(UTC)
Lansweeper warranty information missing
by  Esben.D  
Go to last post Go to first unread
Last post: Yesterday at 2:33:03 PM(UTC)
Lansweeper Dell Switch Servicetag
by  Esben.D   Go to last post Go to first unread
Last post: Yesterday at 2:12:22 PM(UTC)
Lansweeper Office 365 ProPlus not detected in a few PCs
by  Esben.D  
Go to last post Go to first unread
Last post: Yesterday at 2:10:44 PM(UTC)
Lansweeper Imageright Installation
by  CyberCitizen   Go to last post Go to first unread
Last post: Yesterday at 1:01:30 AM(UTC)
Lansweeper Is the conditional step for OS arch broken?
by  CyberCitizen  
Go to last post Go to first unread
Last post: Yesterday at 1:00:54 AM(UTC)