Import multiple e-mail addresses for emailaddress proxy address collection
Sorry if this was already posted - I searched every way with no similar results. I need to convert user accounts from mailbox enabled to mailenabled users. I exported all current emailaddresses, exported the current legacyexchangeDN value - made this an X500 address, and all needed items for this to work. Individual import works - but I can't seem to get one part to work for bulk. Created a text file that uses | as a delimiter Header is DN|ExternalAddress|CompleteAddresses If I use this Powershell command to import this - it works good to load the table PS > $list = Import-Csv .\Quicktest.txt -Delimiter "|"PS > $list | gm TypeName: System.Management.Automation.PSCustomObject Name MemberType Definition---- ---------- ----------Equals Method bool Equals(System.Object obj)GetHashCode Method int GetHashCode()GetType Method type GetType()ToString Method string ToString()CompleteAddresses NoteProperty System.String CompleteAddresses=SMTP:QuickTest@domain.net,X500:blah-blah;blah,smtp:QuickTest2@domain.netDN NoteProperty System.String DN=QuickTestExternalAddress NoteProperty System.String ExternalAddress=SMTP:QuickTest@domain.net Because it saves it as a system.string, it won't add the multi values individually for completeaddresses foreach($entry in $list){Set-Mailuser $entry.dn -Emailaddresses $entry.completeaddress -confirm:$false} I can easily delete the mailbox, convert to mailenabled user, and add the external address. I can't update the emailaddresses field with multiple addresses from an import. I need to do close to 700 - so 1 at a time will be a pain :-( Thanks in advance for help with this.
April 7th, 2010 8:01pm

If anyone else needs/wants to do this - here are the parts that work: foreach($entry in $list){Disable-Mailbox $entry.dn -confirm:$false Enable-Mailuser $entry.dn -ExternalEmailaddress $entry.ExternalAddress -confirm:$false set-MailUser $entry.dn -EmailAddressPolicyEnabled:$False }
Free Windows Admin Tool Kit Click here and download it now
April 7th, 2010 8:19pm

Try: foreach($entry in $list) { Set-Mailuser $entry.dn -Emailaddresses $entry.completeaddress.split(",") -confirm:$false }
April 7th, 2010 8:19pm

You can do this a couple of ways. For mass conversions from mailbox to mailenabled (which I've done a few of) I've done one of the following: Pulled all of the addresses into a unique variable then used the set-mailuser command, i.e.: set-mailuser $dn -emailaddresses $smtpaddy1,$smtpaddy2,X500:$old_ledn Or, you can simply mail enable everyone, then go back and append the address: $mbx = get-mailbox –identity user1 $mbx.emailaddresses += ("smtp:user1@domain.com","smtp:user1-alias@domain.com") Set-mailbox –identity user1 –emailaddresses $mbx.emailaddresses Hope this helps. -alex
Free Windows Admin Tool Kit Click here and download it now
April 7th, 2010 8:34pm

Thanks Alex and Mike I used the split(",") addition. That worked great! Thank you again for the quick assistance -Kevin
April 7th, 2010 8:36pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics