Skip to content

Powershell Script to Configure Active Directory Lab. It does not Create the Machine itself. You have to run this script on the machine that you want to configure as the Active Directory Server. It eases the process of spinning up Active Directory Lab.

License

Notifications You must be signed in to change notification settings

amitn322/createADLab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

createADLab

This is a powershell script to Configure Active Directory Lab. This script doesn't deploy the machine or install the operating system. You can prepare your operating system and just clone and run this script with all the options configured in the adConfig.json file in the same directory as this script. This script currently supports upto 3 Domain Controllers. Two Domain Controllers for the parent domain and a third domain controller for the Child Domain. You can choose to create single, two or three Domain Controllers. Just run the script on each server that you would like to configure as a DC. Additionally it also creates an enterprise admin user as configured in the json file.

Sample Config File adConfig.json

{
    "totalServers":  "3",
    "domainName":  "example.lab",
    "domainNetBiosName":  "examplelab",
    "childDomainName": "child",
    "dnsServer":  "192.168.171.254",
    "defaultGateway": "192.168.171.2",
    "maskBits":  "24",
    "eaUserName":  "eauser",
    "eaPassword":  "MyL@bDCP@ssw0rd",
    "AdminPassword":  "MyL@bDCP@ssw0rd",
    "safeModeAdminPassword":  "MyL@bDCP@ssw0rd",
    "dc1IPAddress":  "192.168.171.254",
    "dc1HostName":  "dc01",
    "dc2IPAddress":  "192.168.171.253",
    "dc2HostName":  "dc02",
    "dc3IPAddress": "192.168.171.252",
    "dc3HostName":  "dc03"
}

How To Run:

Pass the serverNumber variable based on which server you are running this script on. 1 for first server, 2 for second server and 3 for third server.

Examples:

On First Server:

.\configureADLab -serverNumber 1

Second Server:

.\configureADLab -serverNumber 2

Third Server:

.\configureADLab -serverNumber 3

Note: Do not run script upon reboot. It will automatically Continue until the configuration is complete.

Features

  • Automatically configure AD Lab Environment with Two Domain Controllers and a child domain.
  • Simple configuration with adConfig.json file.
  • Auto Resume on Reboot.

Future Enhancements

  • Add more user , OU creation.
  • Add various active directory misconfigurations
  • Add various AD attack scenarios.

Need Help ?

Please open up an issue if you encounter any issues and I will try to resolve them as and when I can.

Want to contribute ?

Please send a pull request if you add a feature or would like to contribute.

Buy me Coffee

Buy Me A Coffee

Youtube Demo and Tutorial

Alt text

About

Powershell Script to Configure Active Directory Lab. It does not Create the Machine itself. You have to run this script on the machine that you want to configure as the Active Directory Server. It eases the process of spinning up Active Directory Lab.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published