PoshTip #54 – Change AD computers attributes with PowerShell

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:

Please note that you can use the -credential parameter if needed.

Finally, let’s imagine that I want to update « extententionattribute1 »:

It’s done!


Thanks for reading! You can follow me on Twitter @PrigentNico

About Nicolas 192 Articles
I work as a System Engineer, based in Switzerland with a primary focus on Microsoft technologies. I have 7 years experience in administering Windows Servers. . I am a Microsoft MVP for Cloud & Datacenter Management. I also received the PowerShell Hero 2016 award by PowerShell.0rg. And finally, I am "MCSA: Windows Server 2012" and "Administering & Deploying SCCM" certified.