Forum Discussion
Marvin Oco
Feb 16, 2021Iron Contributor
powershell script to edit AD telephone notes
what is the powershell script to edit AD telephone notes the data is from csv file with header UPN and "telephone notes"
MarkOtto
Feb 17, 2021Copper Contributor
Here's one way you can do it.
In this example, you can set all five of the phone attributes with a single command.
Set-ADUser -Identity billy.test -Replace @{homePhone=06202123;facsimileTelephoneNumber=67543256;mobile=01278564;pager=89765412;ipPhone=98723456}
You can also set each phone attribute one at a time.
Set-ADUser -Identity billy.test -Replace @{homePhone=06202123}
Set-ADUser -Identity billy.test -Replace @{facsimileTelephoneNumber=67543256}
Set-ADUser -Identity billy.test -Replace @{mobile=01278564}
Set-ADUser -Identity billy.test -Replace @{pager=89765412}
Set-ADUser -Identity billy.test -Replace @{ipPhone=98723456}