exentions arributes

Need to edit the extension attributes for users. Example:
call csv that has column of: samaccountname
change: extensionAttribute1 to an ip: 1.1.1.1

The extension attributes are located within adsiedit for users and there are 15 extension attributes.

Your insight and help are greatly appreciated.

Use Set-ADUser and pass a hash table to its -Property (or is it -Properties?) parameter, as shown in the help file examples.

I know you are new to powershell based on your other post, but the best way to learn is to try!

Try writing some stuff and let us know where you run into problems.

Read these:

https://technet.microsoft.com/en-us/library/ee617241.aspx

https://blogs.technet.microsoft.com/heyscriptingguy/2013/12/22/powertip-set-custom-attributes-in-active-directory/

Hey Don,

import-csv C:\users1.csv | % {set-aduser -identity $.samaccountname -extensionattribute1 $.extensionattribute1}
Set-ADUser : A parameter cannot be found that matches parameter name ‘extensionattribute1’.
At line:1 char:70

  • … {set-aduser -identity $.samaccountname -extensionattribute1 $.exte …
  •                                          ~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidArgument: (:slight_smile: [Set-ADUser], ParameterBindingException
    • FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.ActiveDirectory.Management.Commands.SetADUser

got it with this.

import-csv C:\users1.csv | % {set-aduser -identity $_.samaccountname -Add @{extensionAttribute4=“myString”}}

thanks all!