Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Powershell add Phone # to User Mailbox

Posted on 2013-06-25
Medium Priority
Last Modified: 2013-06-25
I have a CSV file with two columns (name,phone) and I can successfully set the CustomAttribute (below) to the phone number but I cannot find the correct argument to set the business phone and fax?  Is their no argument to call to set these particular fields?

Import-Csv 'phone.csv' | ForEach-Object { Set-Mailbox -Identity $ -CustomAttribute15 $ }
Question by:ats2012
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
LVL 40

Accepted Solution

Subsun earned 2000 total points
ID: 39276082
Set-Mailbox doesn't have a parameter to add the phone number..

Import-Module ActiveDirectory
Import-Csv 'phone.csv' | ForEach-Object { Set-ADUser $ -officephone $ }

Open in new window


Author Comment

ID: 39276123
That works fine but I'm trying to update phone number in Exchange 2010 to update GAL.  The AD accounts aren't linked to user mailbox.
LVL 40

Expert Comment

ID: 39276133
The AD accounts aren't linked to user mailbox.
I didn't get you, can you explain?
Are You Ready for GDPR?

With the GDPR deadline set for May 25, 2018, many organizations are ill-prepared due to uncertainty about the criteria for compliance. According to a recent WatchGuard survey, a staggering 37% of respondents don't even know if their organization needs to comply with GDPR. Do you?


Author Comment

ID: 39276172
What I mean is that the script will update the active directory phone number but that change isn't reflected in the Exchange Management Console (EMC) for that user mailbox.  If the updated phone number isn't shown in the fax or business phone property boxes in EMC then it's not going to be shown in global address book, which is my goal.

Author Closing Comment

ID: 39276196
Yes, this works.
LVL 40

Expert Comment

ID: 39276199
telephoneNumber is the attribute which we are updating using the script, it should reflect in GAL... Can you check in OWA and see if you are able to view the updated number?
LVL 40

Expert Comment

ID: 39276200
Ok good!

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will help to fix the below error for MS Exchange server 2010 I. Out Of office not working II. Certificate error "name on the security certificate is invalid or does not match the name of the site" III. Make Internal URLs and External…
The core idea of this article is to make you acquainted with the best way in which you can export Exchange mailbox to PST format.
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to:…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question