Powershell add Phone # to User Mailbox

Posted on 2013-06-25
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 500 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?
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.


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

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

Lotus Notes – formerly IBM Notes – is an email client application, while IBM Domino (earlier Lotus Domino) is an email server. The client possesses a set of features that are even more advanced as compared to that of Outlook. Likewise, IBM Domino is…
A list of top three free exchange EDB viewers that helps the user to extract a mailbox from an unmounted .edb file and get a clear preview of all emails & other items with just a single click on mailboxes.
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

734 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