Need Help - Adding Alias Addresses to Mail Users in O365

This topic contains 1 reply, has 2 voices, and was last updated by  Alex 1 year, 10 months ago.

  • Author
  • #46074

    Luke J Osborne

    I have a spreadsheet with three columns; Name, Email Address (already in O365) and Secondary Email Address.

    I need to add the SECONDARY EMAIL ADDRESSES to the users in Office 365 via a script or command but I am having no luck, can you help me?


  • #46084


    You will need to set the users mailbox to add an address.

    Set-Mailbox “User″ -EmailAddresses @{add=””}

    So you would want something like:

    $csv = import-csv file.csv
    foreach($users in $csv)
    set-mailbox $emailaddress -emailaddresses @{add="$secondaryemailaddress"}

    I would do some testing with this though, as I do not have a O365 environment to test this on.

    i.e. try:
    set-mailbox $emailaddress -emailaddresses @{add="$secondaryemailaddress"}
    with one user and see if it works.

    You will need to get a pssession into the exchange part of O365 to be able to do this.

You must be logged in to reply to this topic.