Solved

How to modify telephoneNumber AD user property ?

Posted on 2013-01-04
5
1,481 Views
Last Modified: 2013-01-04
Hello,

I am getting the following error once I changed the Telephone number for an AD user.

Type the new TELEPHONE Number:: 3034938004

Are you sure, you want to replace the following Title "303-493-8004" by "3034938004" (Y/N): y
Set-ADUser : A parameter cannot be found that matches parameter name 'telephoneNumber'.
At C:\scripts\AD\test.ps1:136 char:58
+                                 Get-ADUser $AD_User.sAMAccountName  | Set-ADUser -telephoneNumber $Input ...
+                                                                                  ~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Set-ADUser], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.ActiveDirectory.Management.Commands.SetADUser

Thanks for your help,
0
Comment
Question by:namerg
  • 3
  • 2
5 Comments
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 38745124
Try with -OfficePhone parameter
Get-ADUser $AD_User.sAMAccountName  | Set-ADUser -OfficePhone $Input
0
 

Author Comment

by:namerg
ID: 38745148
Perfect Subsun.

But, how did you know it was -OfficePhone ?

I go to the ADSI edit and do not see any OfficePhone.

Thanks,
0
 
LVL 40

Expert Comment

by:Subsun
ID: 38745189
I would check with Get-Help or technet reference for parameters.. :-)
0
 
LVL 40

Expert Comment

by:Subsun
ID: 38745311
Here is a good reference for all commands..
http://ss64.com/ps/
0
 

Author Comment

by:namerg
ID: 38745335
Hmm ok. Thanks a million
0

Join & Write a Comment

Set OWA language and time zone in Exchange for individuals, all users or per database.
Create and license users in Office 365 in bulk based on a CSV file. A step-by-step guide with PowerShell script examples.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

744 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now