Notification

Icon
Error

Delete old AD-Users in non existing Domain

Posted: Tuesday, March 12, 2019 5:40:12 PM(UTC)
BastiOn

BastiOn

Member Original PosterPosts: 21
1
Like
Hy,

we have severel hundred users from a defunct domain. The users have been migrated to our active Domain.
Unfortunately the users wasn't delete in Lansweeper. Under "Active Directory Users OU" the domain and the users still stand.

How can i delete all users with SQL Command? I do not want to try this on the livesystem

Thanks
BastiOn

natebraun1
#1natebraun1 Member Posts: 6  
posted: 3/13/2019 3:34:54 PM(UTC)
Hello,

I have the same issue. We went through a merger last year and had two domains being scanned. Now, all users have been migrated, and we are left seeing duplicate users. Is there a bulk delete for users in the same way as assets?

Thank you,

Nate
natebraun1
#2natebraun1 Member Posts: 6  
posted: 3/14/2019 4:23:35 PM(UTC)
So, I went into SQL Server Manager and ran the following simple query.
Substitute your domain name for OLD_DOMAIN_NAME.

I got rid of them all real quick. Hit F5 on my browser, and they were gone.



Delete [lansweeperdb].[dbo].[tblADusers]
WHERE [Userdomain] = 'OLD_DOMAIN_NAME'
BastiOn
#3BastiOn Member Original PosterPosts: 21  
posted: 3/14/2019 6:10:03 PM(UTC)
Hy natebraun1

it works very nice Angel

thx

Active Discussions

Lansweeper NOT doesn't work as expected
by  KevinA-REJIS   Go to last post Go to first unread
Last post: Yesterday at 5:49:29 PM(UTC)
Lansweeper Combined Vulnerability Report Q1 2019
by  Leslie Stroobant  
Go to last post Go to first unread
Last post: Yesterday at 3:27:42 PM(UTC)
Lansweeper All Devices with WINS Service Running on the Network
by  Andy.S   Go to last post Go to first unread
Last post: Yesterday at 2:44:56 PM(UTC)
Lansweeper Physical Laptops and Desktops Only
by  pryan67  
Go to last post Go to first unread
Last post: Yesterday at 1:51:56 PM(UTC)
Lansweeper Assistance With AV & Bitlocker Report
by  Andy.S   Go to last post Go to first unread
Last post: Yesterday at 12:50:47 PM(UTC)
Lansweeper Count of completed KB installation Report
by  jamie21  
Go to last post Go to first unread
Last post: 6/4/2020 11:49:57 AM(UTC)
Lansweeper local admin users of a specific device
by  Andy.S   Go to last post Go to first unread
Last post: 6/4/2020 10:42:23 AM(UTC)
Lansweeper Bitlocker Report not contain all computers
by  Andy.S  
Go to last post Go to first unread
Last post: 6/3/2020 6:20:53 PM(UTC)