Solved

Powershell add Phone # to User Mailbox

Posted on 2013-06-25
7
1,345 Views
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 $_.name -CustomAttribute15 $_.phone }
0
Comment
Question by:ats2012
[X]
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
7 Comments
 
LVL 40

Accepted Solution

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

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

Open in new window

0
 

Author Comment

by:ats2012
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.
0
 
LVL 40

Expert Comment

by:Subsun
ID: 39276133
The AD accounts aren't linked to user mailbox.
I didn't get you, can you explain?
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 

Author Comment

by:ats2012
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.
0
 

Author Closing Comment

by:ats2012
ID: 39276196
Yes, this works.
0
 
LVL 40

Expert Comment

by:Subsun
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?
0
 
LVL 40

Expert Comment

by:Subsun
ID: 39276200
Ok good!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
In previous parts of this Nano Server deployment series, we learned how to create, deploy and configure Nano Server as a Hyper-V host. In this part, we will look for a clustering option. We will create a Hyper-V cluster of 3 Nano Server host nodes w…
In this video we show how to create an email address policy 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…
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…

763 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