Link to home
Start Free TrialLog in
Avatar of shong1997
shong1997

asked on

Powershell Script to Get User DN an

I need a Powershell script to read a text/CSV file with a list of AD user accounts and export users' distinguished name (DN) to a CSV file.  

Thanks,
Avatar of yo_bee
yo_bee
Flag of United States of America image

What values are in your CSV file?
try this:

Import-Csv D:\test.txt | select dn | export-csv -Append -NoTypeInformation process.csv

Open in new window

Avatar of shong1997
shong1997

ASKER

I have an import CSV file which I use to extract other AD/Exchange info.  The CSV file contains 'Name' as the heading and user accounts are listed line by line.
So the name is Smith, John or jsmith
jsmith
ASKER CERTIFIED SOLUTION
Avatar of yo_bee
yo_bee
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial