Forum Discussion
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"
2 Replies
- farismalaebIron Contributor
Also, this is another method
$Values=@{ homePhone="12311" facsimileTelephoneNumber ="123123" mobile="123123" pager="123123" ipPhone="123123" info="This is test" } Set-ADUser -Identity cell1 -replace $Values - MarkOttoCopper 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}