Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Powershell add Phone # to User Mailbox

Posted on 2013-06-25
7
Medium Priority
?
1,493 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
  • 4
  • 3
7 Comments
 
LVL 40

Accepted Solution

by:
Subsun earned 2000 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

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

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Question has a verified solution.

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

In this post, I will showcase the steps for how to create groups in Office 365. Office 365 groups allow for ease of flexibility and collaboration between staff members.
There can be many situations demanding the conversion of Outlook OST files to PST format and as such, there is no shortage of automated tools to perform this conversion. However, what makes Stellar OST to PST converter stand above the rest? Let us e…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

916 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