This batch files populates Active Directory with organizational units, user accounts, computer accounts, local and global groups, and manages membership of those groups. This is accomplished by calling a number of other batch files to perform specific tasks : createOU.bat, createUsers.bat, createComputers.bat.

The following script obviously assumes a certain design in the Active Directory : an Organizational Unit logical structure, users with membership to groups, therefore also a logical structure of somain local and global groups, etc. This is described in Active Directory Design and Implementation.

REM summary script for AD, Users, Groups, Computers and ACL setup/config
@echo off

REM  -- 1 -- check that all required batch files exist
IF NOT EXIST  createOU.bat GOTO err1
IF NOT EXIST  createUsers.bat GOTO err2
IF NOT EXIST  createComputers.bat GOTO err3

REM -- 2 -- run batch files			___ MAIN ____
	call createOU.bat
	call createUsers.bat
	call createComputers.bat
	REM call resetACL.bat		

REM -- 4 -- exit
echo batch process finished
GOTO batchend

REM -- handle errors --				___ ERROR HANDLING ____
ECHO missing : createOU.bat
GOTO err

ECHO missing : createUsers.bat
GOTO err

ECHO missing : crateComputers.bat
GOTO batchend 

ECHO %0 did not complete succesfully. 



Koen Noens
june 7, 2005