How to find two value duplicate user in active directory

Iron Contributor


    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

The script looks OK to me, not sure what the question is?