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: 14
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: 14  
posted: 3/14/2019 6:10:03 PM(UTC)
Hy natebraun1

it works very nice Angel

thx

Active Discussions

Action Change Windows domain PC Name
by  max204   Go to last post Go to first unread
Last post: 9/19/2019 10:28:29 AM(UTC)
Lansweeper Launch PowerShell remote PSSession
by  Ian  
Go to last post Go to first unread
Last post: 9/9/2019 12:10:56 PM(UTC)
Action Remote print management
by  CyberCitizen   Go to last post Go to first unread
Last post: 9/4/2019 3:53:00 AM(UTC)
Lansweeper Infopath installer help
by  CyberCitizen  
Go to last post Go to first unread
Last post: 9/2/2019 8:18:06 AM(UTC)
Lansweeper Remote Registry 2019
by  EB   Go to last post Go to first unread
Last post: 8/22/2019 3:47:10 PM(UTC)
Lansweeper lspush smtp direct send
by  Danilo Ferrari  
Go to last post Go to first unread
Last post: 8/1/2019 1:39:26 PM(UTC)
Action Delete old user profiles
by  DaveDischord   Go to last post Go to first unread
Last post: 7/30/2019 6:18:28 PM(UTC)
Lansweeper Best way to delete multiple registries
by  Corcos  
Go to last post Go to first unread
Last post: 7/25/2019 8:18:23 PM(UTC)