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: 3
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 Asset Value Report
by  RC62N   Go to last post Go to first unread
Last post: 9/20/2019 7:12:29 PM(UTC)
Lansweeper Display Hyper-V Guest User report
by  GlenTB  
Go to last post Go to first unread
Last post: 9/20/2019 2:26:15 PM(UTC)
Report Center Windows Defender Antivirus Broken Scan Audit
by  Esben.D   Go to last post Go to first unread
Last post: 9/20/2019 12:18:02 PM(UTC)
Lansweeper Reports are empty
by  Mendoza  
Go to last post Go to first unread
Last post: 9/20/2019 11:12:18 AM(UTC)
Lansweeper Custom Helpdesk Report
by  StevoCamaro   Go to last post Go to first unread
Last post: 9/19/2019 11:13:05 PM(UTC)
Lansweeper Windows 7 EOL
by  RC62N  
Go to last post Go to first unread
Last post: 9/19/2019 4:42:11 PM(UTC)
Lansweeper Drive Encryption statuses
by  DFox   Go to last post Go to first unread
Last post: 9/19/2019 12:54:06 PM(UTC)
Lansweeper Patch Tuesday report, last 3 months
by  Esben.D  
Go to last post Go to first unread
Last post: 9/19/2019 10:55:07 AM(UTC)