Powershell add Phone # to User Mailbox

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 }
ats2012Asked:
Who is Participating?
 
SubsunConnect With a Mentor Commented:
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
 
ats2012Author Commented:
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
 
SubsunCommented:
The AD accounts aren't linked to user mailbox.
I didn't get you, can you explain?
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

 
ats2012Author Commented:
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
 
ats2012Author Commented:
Yes, this works.
0
 
SubsunCommented:
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
 
SubsunCommented:
Ok good!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.