Avatar of namerg
namerg
Flag for United States of America asked on

How to modify telephoneNumber AD user property ?

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,
PowershellActive Directory

Avatar of undefined
Last Comment
namerg

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
SubSun

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
namerg

ASKER
Perfect Subsun.

But, how did you know it was -OfficePhone ?

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

Thanks,
SubSun

I would check with Get-Help or technet reference for parameters.. :-)
SubSun

Here is a good reference for all commands..
http://ss64.com/ps/
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
namerg

ASKER
Hmm ok. Thanks a million