how to import x500 addresses into the proxyaddreses attribute from a CSV?

K B used Ask the Experts™
There is no exchange management shell just AD & Quest cmdlets to work with.
Thank you.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Jeremy WeisingerSenior Network Consultant / Engineer

You can do it with the Set-ADUser cmdlet. E.g.:

Set-ADUser test1 -Add @{proxyAddresses="X500:/o=<org name>/ou=<site name>/cn=Recipients/cn=test1"}

Open in new window

Following up on Jeremy's script.  If you need it to read from a .csv file try this:

Create a .csv file with a column labelled Username and another labelled X500.  Save the user details in this .csv file on the DC.  Run this script:

Import-Module activedirectory

$users = Import-Csv users.csv

$users | ForEach-Object {
    Set-ADUser $users.username -Add {proxyAddresses=$users.x500 -WhatIf}

Open in new window

I don't have a sandbox to work with at the moment so I can't test it.  I appended everything with a -WhatIf so it won't change anything but will let you know of any errors it might contain.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial