DHPBilcare
asked on
Powershell Script to identify users with the same display name
I need to write and automate a power shell script to identify any users in active directory thay have a duplicate Display Name. Any help would be appreciated.
ASKER
Thanks for that. Could I just copy that directly into a .BAT file to run from the Active Directory server?
That's PowerShell, so it's .ps1. Otherwise yes, save it as it is.
ASKER
Thanks. Done that but how do I enforce it to run on the server as administrator? Currently when I open the file with PowerShell it runs but I don’t see the output CSV file.
As usual: you right-click the PowerShell shortcut and choose "Run as administrator". These are just read operations, so unless you explicitly restricted access, a regular user should be able to run it as well.
If it doesn't produce output (no error messages either?), then there probably aren't any duplicates.
Setup a test user with a known duplicate DisplayName and run it again.
If it doesn't produce output (no error messages either?), then there probably aren't any duplicates.
Setup a test user with a known duplicate DisplayName and run it again.
ASKER
Thanks for you help. It is giving a red error but it flages on the screen and is too quick to read.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect! Much appreciated, all now working. :)
Open in new window