WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

ADSI
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Copy User or Computer Account in AD

Keywords: 	 Copy User or Computer Account in AD

Question:

I'm writing a script to generate user IDs and computer accounts in my AD based on an input list.

I've found that it will be much easier to create a Template user and copy it than to create each ID from scratch and set all of the properties.

Can someone tell me the easiest way to just copy a user/computer account in the AD? Thanks.

Answer:

Copying an object is a bit tricky because some of the property values must be unique to the object and of course the properties that must be unique can vary from object class to object class. I would create a script with hard coded values for properties that do not change from user to user and either prompt or read from a file the values that do vary. The extender does have a copy function for security objects. It may be possible to add a function that specifically copies the user object in Active Directory. We'll add it to the enhancement list and see if someone can figure it out.
Article ID:   W15032
File Created: 2002:09:05:13:49:16
Last Updated: 2002:09:05:13:49:16