SCCM – Finding duplicate account in Active Directory

Recently, I was asked to provide a way to find AD Duplicate Accout. So, here’s a simple query I use to build a report that finds duplicates active directory account based on GivenName and SN. ;

select distinct GivenName0 As ‘First Name’, sn0 As ‘Last Name’

from dbo.v_R_User

group by GivenName0,sn0

having count(GivenName0) > 1

order by GivenName0

Also, if needed you can change the value to find other duplicate value

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s