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 Remove all users from old domain
by  cmuter   Go to last post Go to first unread
Last post: 9/20/2019 8:03:58 PM(UTC)
Lansweeper Static IP Address
by  cycleheat  
Go to last post Go to first unread
Last post: 9/20/2019 4:07:16 PM(UTC)
Lansweeper Bitlocker Encryption Recovery Key no information found
by  Stephane   Go to last post Go to first unread
Last post: 9/20/2019 2:26:19 PM(UTC)
Lansweeper InTune Scanning Issues
by  Esben.D  
Go to last post Go to first unread
Last post: 9/20/2019 12:34:59 PM(UTC)
Lansweeper Office 365 scanning issues
by  Esben.D   Go to last post Go to first unread
Last post: 9/20/2019 12:23:30 PM(UTC)
Lansweeper Hard Drive Tracking - Start to Finish
by  Lone Jedi  
Go to last post Go to first unread
Last post: 9/19/2019 8:11:56 PM(UTC)
Lansweeper Lansweeper Reporting Old Assets as New
by  Jpatterson   Go to last post Go to first unread
Last post: 9/19/2019 12:52:14 PM(UTC)
Lansweeper Cannot edit a ticket anymore
by  Esben.D  
Go to last post Go to first unread
Last post: 9/19/2019 12:32:42 PM(UTC)