Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

Hi Everyone

 

I need to add several Ldap atributes to numerous computer accounts in Active Directory

 

I have this script but it only adds detail to one computer account. I need to read computer accounts from file using a for loop

 

Script as follows:-

 

Set objComputer = GetObject ("LDAP://CN=ibook04,ou=A4 Apple Computers,ou=Classroom PCs,DC=churchdown,DC=gloucs,DC=sch,DC=uk")

objComputer.Put "description", "Art-A4"

objComputer.SetInfo

 

Any pointers would be greatly appreciated )

Posted

Are you happy using PowerShell?

 

If so you could use Import-CSV and a foreach loop, just replacing the computer name in the LDAP string with something like $computer.

Posted

There's a script here which will create computer objects from a CSV file, and should give you the basic structure to work with.

 

And another here which demonstrates how to modify AD attributes.

 

Hope that helps.

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...