Forum Discussion
Tien Ngo Thanh
Oct 27, 2019Iron Contributor
How to find two value duplicate user in active directory
hi
I want find user in active directory has value duplicate with attribute as employeeID and mobile
if find only one then i have a script below
Get-ADUser -Filter {(employeeID -like "*")} -property employeeID |Group employeeid | ? {$_.Count -ge 2} | select -ExpandProperty group | Select-Object Enabled, ObjectClass, Name, distinguishedName, SamAccountName, employeeID | Export-Csv C:\Scripts\FindDuplicateValueUser\employeeId_is_duplicate.csv
Best Regards
1 Reply
Sort By
The script looks OK to me, not sure what the question is?