Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Adding x500 addresses to multiple user objects using CSV input file

$
0
0

Hello

I need to add an x500 entry containing the legacy DN from our previous mail provider to the proxy address attribute for all our AD users.

I'm using a CSV file with the following format

user,legacy
rlanden,rlandenda3

I used the following powershell line to add the x500 entry:

Import-CSV d:\LegacyDN_input_list.csv | foreach{Set-ADuser -identity $_.user -add @{proxyAddresses = "X500:/o=mex05/ou=Exchange Administrative Group/cn=Recipients/cn=$_.legacy"}}

The X500 record was added to the objects but not as i wanted it, it turned out like this

/o=mex05/ou=Exchange Administrative Group/cn=Recipients/cn=@{user=rlanden; legacy=rlandenda3}.legacy

Could someone help explain why the output has ended up like this and how I can correct it.

Thanks,

Richard


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>