save this text file as batch (.bat), this batch file will create and modify all active directory objects including OUs, Groups and Users, also you can modify some users attributes property through this batch.

 

explain batch processing:

  1. Our domain name is BIGLAB.COM (already created).
  2. Create 5 organizational units (OUs) - company departments - (IT, HR, Sales, markting and quality assurance (QA)).
  3. Create 5 groups for each department (IT_G, HR_G, .....).
  4. create 5 users in each OU with standard password and add each user to his department and allow all users to change password at first login.
  5. query all users in each OU then add each them to appropriate group according to departments.

 

Note 1: save this file as batch (.bat extention)

Note 2: run this saved batch as administrator.

Note 3: you can edit this batch file in notepad to match your requirements by right click on it then select edit.