December 22nd, 2013

PowerTip: Set Custom Attributes in Active Directory

Doctor Scripto
Scripter

Summary: Use the Set-ADUser cmdet to modify custom attributes.

Hey, Scripting Guy! Question How can I use Windows PowerShell to modify a custom attribute in Active Directory?

Hey, Scripting Guy! Answer Use the Set-ADUser cmdlet and it’s –add-replace, and –remove parameters to adjust custom attributes.

For example, to update the Info attribute in Active Directory and replace it with a new value:

SET-ADUSER john.smith –replace @{info=”John Smith is a Temporary Contractor”}

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.