Discussion Locked

Creating OUs using Scripts

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi Geeks,

How can I create OUs and users in those OUs using scripts/csvde or through ldifde?
I have a csv files and spreadsheet containing the user details and OU they should belong.

Thanks in advance.

1 reply

by mcse rabbi

To the best of my knowledge, you can't use csvde or lidifde to *create* OU's. You simply import ( -i ) the contents of the CSV (or LDF) file into AD. Since the file contains the OU information, that OU has to exist in AD, otherwise the import willfail.

You need to check out the ADSI (Active Directory Services Interface) tool. I don't have that much experience with ADSI, but I do know it's pretty powerful. I'm pretty sure you can create OUs through scripting, as well as a host of other things.

http://www.microsoft.com/windows2000/techinfo/howitworks/activedirectory/adsilinks.asp

This discussion is closed to new replies.