An open API service indexing awesome lists of open source software.

https://github.com/drewmarsh/on-premises-active-directory-configuration

Active Directory Domain-controller/Client configuration with a bulk user creation script for simulating employees
https://github.com/drewmarsh/on-premises-active-directory-configuration

active-directory azure domain-controller system-administration

Last synced: about 2 months ago
JSON representation

Active Directory Domain-controller/Client configuration with a bulk user creation script for simulating employees

Awesome Lists containing this project

README

          



AD Logo


Network Diagram

# ๐Ÿง  Technologies Used
- Active Directory Domain Services
- Microsoft Azure (Cloud computing)
- Microsoft Remote Desktop
- PowerShell
- Windows Server 2022
- Windows 10 Pro, version 22H2

# โš™๏ธ Deployment & Configuration

### ๐Ÿ–ฅ๏ธ Create both Azure Virtual Machines [(example guide)](https://github.com/drewmarsh/azure-creating-VM)
- **Client-1** running Windows 10 Pro, version 22H2 - x64 Gen2
- **DC-1** running Windows Server 2022 Datacenter Azure Edition - x64 Gen2

> [!NOTE]
> Put both of these Azure Virtual Machines into a Resource Group called `DC-1_group`

### ๐Ÿ›œ Configure static IP address on Domain Controller 1 (DC-1)
1. Open the DC-1 virtual machine
2. Navigate to `Networking` > `Network settings` > The name of the network interface (ex. `dc-1410`) > `IP configurations`
3. Select `ipconfig1`
4. Change `Dynamic` to `Static`
5. Click `Save`

Static IP

### ๐Ÿ“‹ RDP into DC-1 and enable ICMP rules

After the domain controller fully initializes, minimize the Server Manager window for now.

1. Use windows search to open 'Windows Defender Firewall'
2. Select `๐Ÿ›ก๏ธ Advanced settings`
3. Navigate to the 'Inbound Rules' tab
4. Find the two rules labeled 'Core Networking Diagnostics - ICMP Echo Request (ICMPv4-In)'
5. Right-click and select `Enable` on both rules

Inbound Rules

### ๐Ÿ“ฅ Install Active Directory on DC-1
1. Open Server Manager
2. Click `Manage` > `Add Roles and Features`
3. Click `Next` 3 times to get to the Server Roles tab
4. Enable โ˜‘๏ธ ```Active Directory Domain Services```
5. Click `Add Features`
6. Click `Next` 3 more times until reaching the `Install` button
7. When installation finishes, click `Close`

Tick AD Domain Services

Install AD

In the top-right of the Server Manager window:
1. Click the flag icon with a warning notification
2. Select 'Promote this server to a domain controller'

Promote Server to a DC

In the Active Directory Domain Services Configuration Wizard:
1. On 'Deployment Configuration' tab:
- Tick โ˜‘๏ธ ```Add a new forest```
- Enter "mydomain.com" in **Root domain name:**

Deployment Config

2. On 'Domain Controller Options' tab:
- Set secure password in both fields

Set Password

3. On 'DNS Options' tab:
- Ensure โ—ป๏ธ ```Create DNS delegation``` is unchecked

4. Click `Next` until reaching 'Prerequisites Check' tab
5. Click `Install`

Click Install

Installing

> [!NOTE]
> Your connection to DC-1 will be lost and you'll need to RDP back using "mydomain\" before your username

Computer Is Restarting

New Credentials

When the credentials are accepted, it will take a moment to load back to the desktop while the system waits for the Group Policy Client

Wait for Group Policy

### ๐Ÿ“ Add Organizational Units for Employees & Admins

1. In Server Manager, navigate to `Tools` > `Active Directory Users and Computers`

Users and Computers

2. Create Organizational Units:
- Right-click `mydomain.com` > `New` > `Organizational Unit`
- Create "_EMPLOYEES"
- Repeat process to create "_ADMINS"

_EMPLOYEES

_ADMINS

### ๐Ÿ‘ฉโ€๐Ÿ’ป Add a new admin named Jane Doe

1. Right-click `_ADMINS` > `New` > `User`
2. Enter information:
- **First name:** `Jane`
- **Last name:** `Doe`
- **User logon name:** `Jane_admin`

New User

3. Set password:
- Enter secure password
- Uncheck โ—ป๏ธ ```User must change password at next logon```
- Check โ˜‘๏ธ ```Password never expires```

Jane Doe Password

4. Add to Domain Admins:
- Right-click ๐Ÿ‘ค Jane Doe > `Properties`
- Navigate to 'Member of' tab
- Click `Add...`
- Enter "domain admins"
- Click `Check Names` > `OK`
- Click `Apply` > `OK`

Domain Admins

5. Log out and log back in as Jane_admin

Jane Logon

Jane Welcome

### ๐ŸŒ Add DC-1's private IP as Client-1's DNS server
1. On Client-1, navigate to:
- `Networking` > `Network settings` > Network interface name > `DNS servers`
2. Change from `Inherit from virtual network` to `Custom`
3. Enter DC-1's private IP address in the **Add DNS server** text field
4. Click `Save`
5. Restart Client-1

Add DNS

### ๐Ÿค Join Client-1 to the domain

1. RDP into Client-1
2. Test connection:
- Open Command Prompt
- Ping DC-1's IP (e.g., `ping 10.0.0.4`)
- Verify response

Ping DC

3. Join domain:
- Navigate to `System` > `About` > `Rename this PC (advanced)` > `Change...`
- Enter "mydomain.com" in **Domain:** field
- Enter credentials: "mydomain.com\Jane_admin"
- Restart Client-1

Change PC Name

Join Domain with Admin Credentials

4. Verify on DC-1:
- Open `Active Directory Users and Computers`
- Check `mydomain.com` > `Computers`
- Verify Client-1 is listed

Client-1 Computer

### ๐ŸŒ Set-up Remote Desktop for Non-administrative Users on Client-1

1. On Client-1 (as Jane_admin):
- Open `Settings`
- Navigate to `System` > `Remote Desktop`
- Click `Select users that can remotely access this PC`
- Click `Add...`
- Enter "domain users"
- Click `Check Names` > `OK`

Domain Users

### ๐Ÿ‘ฅ Bulk create Active Directory with script and test

1. On DC-1 (as Jane_admin):
- Open PowerShell ISE
- Click `File` > `New`
- In the **Untitled1.ps1** text box, write your own or paste [this bulk user creation script](https://github.com/drewmarsh/active-directory-bulk-user-creation)
- Click green Run Script button
- Click red Stop Operation when desired users created

Bulk Create AD Users

2. Verify users:
- Check `Active Directory Users and Computers`
- Look in `_EMPLOYEES` folder

Added Users Confirmed

### ๐Ÿงช Testing a Random Newly Created User

1. Attempt to RDP into Client-1 using one of the newly created Active Directory user credentials
- If [the provided script](https://github.com/drewmarsh/active-directory-bulk-user-creation) script was used, the password for every account should be "Password1"

Test New User

User Test Success