+ Post New Thread
Results 1 to 2 of 2
Cloud Services Thread, Office 365 - Add a contact for everyone in Technical; Hello all, Using Powershell or some other method, how can I add a new email contact for all users within ...
  1. #1

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    9,262
    Thank Post
    242
    Thanked 1,568 Times in 1,250 Posts
    Rep Power
    340

    Question Office 365 - Add a contact for everyone

    Hello all,

    Using Powershell or some other method, how can I add a new email contact for all users within a domain or all users within a specified CSV file? Thank you.

  2. #2

    EduTech's Avatar
    Join Date
    Aug 2007
    Location
    Reading
    Posts
    5,047
    Thank Post
    160
    Thanked 913 Times in 716 Posts
    Blog Entries
    3
    Rep Power
    271
    Hi Micheal,

    I am assuming by Mail Contact you mean an alternative SMTP Address for each user, if this is the case then the following should help you do what you require. although this does depend on your environment so here is my best shot without knowing what your environment is

    Option 1 - This assumes you do not have a Directory Sync Server in your Organization:

    In the CSV file you need to have 2 headers with the following UserPrincipalName, EmailAddresses and below this you will then have the respective UPNs and Email Addresses

    and then you would use the following powershell command:

    Import-CSV C:\UserProxies.CSV | ForEach {Set-Mailbox -identity $_.UserPrincipalName -EmailAddresses @{Add="$_.EmailAddresses"}

    Option 2 - This assumes you do have a Directory Sync Server within your Organization

    If you have an Exchange OnPremise Server then you would do this using the Email Address Policy as I am sure you are aware, If you don't then AD PowerShell is good to get this sorted. You use similar syntax and that will be as follows:

    You would use the same CSV File as mentioned in Option 1 with the same headers

    You would then use the following powershell command:

    Import-CSV C:\UserList.CSV | ForEach {$user = Get-ADUser $_.UserPrincipalName -property proxyAddresses | $user.ProxyAddresses = @{Add=$_.EmailAddresses | Set-ADuser -Istance $user}}

    That should do what you require,

    Note: the above command assumes you have seperated each email address you are adding with comma's (but i think you are only adding 1 SMTP Address per user)

    Note 2: Ensure that the Proxy Address you are adding is a verified domain within Office 365

    I hope that helps, If you have any questions please do let me know.

    Regards,
    James.
    Last edited by EduTech; 17th May 2013 at 10:00 PM.

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 2
    Last Post: 28th March 2013, 01:18 PM
  2. Office 365 - Bulk external contacts import
    By tj2419 in forum Cloud Services
    Replies: 0
    Last Post: 15th October 2012, 09:50 PM
  3. Office 365 or Google Apps for Education Demo Request
    By neilault in forum Cloud Services
    Replies: 2
    Last Post: 5th October 2012, 01:32 PM
  4. Replies: 2
    Last Post: 5th February 2012, 01:32 PM
  5. Replies: 3
    Last Post: 20th October 2010, 09:35 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •