Skip to content

Rzfn2/Auto-AD-Builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛠️ Auto-AD-Builder

Auto-AD-Builder is a fully automated Active Directory lab environment that simplifies the deployment of:

  • A Windows Server Domain Controller
  • A Windows 11 domain-joined client
  • An Ubuntu Server for integration

The setup uses custom unattended installation files and automation scripts to streamline configuration. Each system is modular, isolated, and designed for fast deployment.


📂 Environment Setup Guides

Please begin by following the individual OS setup guides to create and install your virtual machines:


⚙️ Configuration Preparation (Required Before Deployment)

Before beginning step-by-step deployment, you must copy the configuration scripts into each virtual machine after OS installation.

🖥️ Windows Server

Use these PowerShell commands inside the VM to download your script files:

Invoke-WebRequest -Uri "https://raw.githubusercontent.com/Rzfn2/Auto-AD-Builder/main/windows-server/AutoDC-Conflagrations.ps1" -OutFile "C:\Users\Administrator\Desktop\AutoDC-Conflagrations.ps1"
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/Rzfn2/Auto-AD-Builder/main/windows-server/AutoDC-Deployment.ps1" -OutFile "C:\Users\Administrator\Desktop\AutoDC-Deployment.ps1"

Edit them if needed:

notepad C:\Users\Administrator\Desktop\AutoDC-Conflagrations.ps1
notepad C:\Users\Administrator\Desktop\AutoDC-Deployment.ps1

Script Descriptions:

  • AutoDC-Conflagrations.ps1: This script runs after the initial installation. It sets the computer name (WINDC-001), configures the network (static IP and DNS), installs the AD DS role, and promotes the server to a Domain Controller with forest and domain setup (ABDULLAH-AD.local). It also reboots the server after promotion.
  • AutoDC-Deployment.ps1: This script runs after the reboot. It handles post-promotion configuration: creates OUs, users, groups, assigns users to groups, and links GPOs to the right OUs.

🪟 Windows 11 Client

Download the client setup script:

Invoke-WebRequest -Uri "https://raw.githubusercontent.com/Rzfn2/Auto-AD-Builder/main/windows11/Auto-Client.ps1" -OutFile "C:\Users\Administrator\Desktop\Auto-Client.ps1"

Edit it if needed:

notepad C:\Users\Administrator\Desktop\Auto-Client.ps1

🐧 Ubuntu Server

Use this command inside the VM:

wget https://raw.githubusercontent.com/Rzfn2/Auto-AD-Builder/main/ubuntu-server/Auto-Ubuntu.sh
chmod +x Auto-Ubuntu.sh
nano Auto-Ubuntu.sh

🚀 Step-by-Step Lab Deployment

✅ Step 1: Configure the Domain Controller (Windows Server)

After first login, run the following script:

powershell -ExecutionPolicy Bypass -File .\AutoDC-Conflagrations.ps1

This script will:

  • Set hostname to WINDC-001
  • Configure static IP and DNS
  • Install AD DS
  • Promote to Domain Controller (ABDULLAH-AD.local)
  • Reboot after setup

After reboot, log back in and run:

powershell -ExecutionPolicy Bypass -File .\AutoDC-Deployment.ps1

This script will:

  • Create Organizational Units (OUs)
  • Create users and groups
  • Add users to groups
  • Link Group Policy Objects (GPOs) to OUs

✅ Step 2: Configure the Windows 11 Client

After login, open PowerShell in the Desktop directory and run:

powershell -ExecutionPolicy Bypass -File .\Auto-Client.ps1

This script will:

  • Download and configure Splunk Universal Forwarder
  • Assign static IP (default: 192.168.12.10)
  • Join the domain ABDULLAH-AD.local

✅ Step 3: Configure Ubuntu Server

Login as abdullah and run:

sudo ./Auto-Ubuntu.sh

This script will:

  • Configure hostname (ubuntu-client)
  • Set static IP and DNS
  • Install required packages (realm, sssd, etc.)
  • Join the domain ABDULLAH-AD.local
  • Install and configure Splunk Forwarder

📋 Credentials Summary

Machine Username Password
Windows Server Administrator Rzfn2@123
Windows 11 Client Administrator Rzfn@123
Ubuntu Server abdullah Password

🔐 Change passwords and hostnames if needed for security or customization.


🧠 Final Notes

  • Follow the OS setup guide links first before script deployment.
  • Ensure all scripts are executed from elevated/administrator terminals.
  • Adjust network configuration if using a different IP range.

📸 Screenshots

image image image

💬 For feedback or issues, please open an issue on the GitHub repository

About

Automate your AD lab: Unattended deployment of Windows Server 2022 DC, Windows 11 client, and Ubuntu Server with PowerShell & Bash, plus Splunk integration.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors