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.
donj
December 15, 2017, 2:16pm
2
Use Set-ADUser and pass a hash table to its -Property (or is it -Properties?) parameter, as shown in the help file examples.
sanchez
December 15, 2017, 2:18pm
3
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: ( [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!