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

it works very nice Angel

thx

Active Discussions

Lansweeper Moving Assets in Location not Saving
by  brodiemac   Go to last post Go to first unread
Last post: Today at 12:23:04 PM(UTC)
Lansweeper HP Printer not showing correctly
by  Esben.D  
Go to last post Go to first unread
Last post: Today at 10:41:49 AM(UTC)
Lansweeper Scanning includes IOS devices even though I exclude them??
by  steveb   Go to last post Go to first unread
Last post: Yesterday at 11:05:33 PM(UTC)
Lansweeper Deployment condition
by  CyberCitizen  
Go to last post Go to first unread
Last post: Yesterday at 5:36:05 AM(UTC)
Lansweeper lsagent not scanning/sending when using relay
by  Esben.D   Go to last post Go to first unread
Last post: 8/19/2019 12:31:02 PM(UTC)
Lansweeper Check if Netbios is disabled over TCP/IP
by  TaherMD  
Go to last post Go to first unread
Last post: 8/19/2019 6:00:51 AM(UTC)
Lansweeper Email attachments
by  krejar   Go to last post Go to first unread
Last post: 8/15/2019 10:15:07 PM(UTC)
Lansweeper Install LsAgent on Mac
by  Jonnym  
Go to last post Go to first unread
Last post: 8/14/2019 10:14:08 AM(UTC)