→ 🚀What's New? Explore Lansweeper's Fall 2024 Updates! Fall Launch Blog !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
khaleehh
Engaged Sweeper II
I need to remove un needed Active Directory Users OU
1 ACCEPTED SOLUTION
Daniel_B
Lansweeper Alumni
If the users in this OU still exist in Active Directory, you'll need to delete this data manually under Configuration\Database Scripts, section Database scripts. Please refer to the Database Dictionary, which is accessible at the top of the report editor. Basically you'll need to delete all entries from tblADusers which have the specific OU (filter on the ADSI name of the OU). We recommend that you perform a database backup before running a script here.

Note: Deleting user accounts doesn't automatically prevent Lansweeper from scanning them again. Review your setup under Configuration\Scanning methods, section Domain User scanning. If the affected users have been logged on to the computers you are scanning, Lansweeper will automatically scan Active Directory for these accounts.

If the user accounts in this OU don't exist any more in Active Directory or have been disabled, you'll also be able to remove them by clean up options which you can set up under Configuration\Server options, section User Cleanup Options.

View solution in original post

3 REPLIES 3
ctw
Engaged Sweeper III
I know this is an old topic, but it didn't exactly answer the question and I have a similar need. I had LS scanning users, but didn't realize that it was scanning all of AD. In the end I'm left with roughly 115k users and it is taking about 5 minutes to load anything AD related because of this. I need to purge the entire user table and start over, I've set the scan to only include users set in my OU to not have this happen again.
Susan_A
Lansweeper Alumni
ctw wrote:
I know this is an old topic, but it didn't exactly answer the question and I have a similar need. I had LS scanning users, but didn't realize that it was scanning all of AD. In the end I'm left with roughly 115k users and it is taking about 5 minutes to load anything AD related because of this. I need to purge the entire user table and start over, I've set the scan to only include users set in my OU to not have this happen again.

You can execute the script below under Configuration\Database Scripts to delete all AD users from your database. Copy and paste the code and hit the Execute SQL Code button. Just to be safe, I do recommend backing up your database first, by following these instructions.
delete from tbladusers

Daniel_B
Lansweeper Alumni
If the users in this OU still exist in Active Directory, you'll need to delete this data manually under Configuration\Database Scripts, section Database scripts. Please refer to the Database Dictionary, which is accessible at the top of the report editor. Basically you'll need to delete all entries from tblADusers which have the specific OU (filter on the ADSI name of the OU). We recommend that you perform a database backup before running a script here.

Note: Deleting user accounts doesn't automatically prevent Lansweeper from scanning them again. Review your setup under Configuration\Scanning methods, section Domain User scanning. If the affected users have been logged on to the computers you are scanning, Lansweeper will automatically scan Active Directory for these accounts.

If the user accounts in this OU don't exist any more in Active Directory or have been disabled, you'll also be able to remove them by clean up options which you can set up under Configuration\Server options, section User Cleanup Options.