x500 address
H I have a excel file like that; displayname legacyexchangedn Joe Black /o=OU/ou=Exchange Administrative Group(FY3BO5312PDLT )/cn=Recipients/cn=joeblack233445 I want to use this excel records and adding exchange users x500 email address as legacyexchange dn. When i run the powershell script it will find user Joe Black with displayname and add legacyexchangedn value as x500 secondar mail address. Thanks
April 8th, 2010 5:22pm
Try something like this, sorry, i don't have a machine to test on right now as I"m in the middle of moving, but it should work. If someone has a better way I'd love to know! -Alex
$csv = import-csv file.csv
foreach ($entry in $csv) {
$mbx = get-mailbox –identity $entry.displayName
$mbx.emailaddresses += (“X500:$entry.legacyExchangeDN”)
Set-mailbox –identity $entry.displayName –emailaddresses mbx.emailaddresses
}
Free Windows Admin Tool Kit Click here and download it now
April 9th, 2010 2:42am