Solved

How to modify telephoneNumber AD user property ?

Posted on 2013-01-04
5
1,565 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

Featured Post

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.

Question has a verified solution.

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

Synchronize a new Active Directory domain with an existing Office 365 tenant
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

772 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