PowerShell can help you to easily update some attributes on a computer or user Active Directory object. Basically it means that if you need to change a custom attribute value to a new one then you must use the Set-ADComputer cmdlet. Let’s see how to use this cmdlet.
First, you must check the Active Directory Name of the attribute that need to be updated (telephonenumber, location, cn, …)
Next, the syntax is the following using the -Add parameter:
Set-ADComputer -Identity "<Your_Hostname>" -Add @{"<attribute_name>"="<value>"}
Please note that you can use the -credential parameter if needed.
Finally, let’s imagine that I want to update “extententionattribute1”:
Set-ADComputer -Identity "SRV01" -Add @{"extensionattribute1"="17022017"}
It’s done!
Thanks for reading! You can follow me on Twitter @PrigentNico