A complete walkthrough for setting up a two-machine Active Directory and Certificate Services lab environment using Windows Server 2025 Evaluation Edition and VirtualBox.
- Prerequisites
- VirtualBox Setup
- Primary Domain Controller Setup
- Certificate Services Setup
- Second Machine Setup
- Post-Configuration Tasks
- Useful Commands and Tools
- Troubleshooting
- Next Steps
- Security Best Practices
- Reference URLs
- Lab Configuration Summary
- Host Machine: Minimum 8 GB RAM (16 GB recommended)
- CPU: Multi-core processor with virtualization enabled
- Storage: 100+ GB available disk space
- VirtualBox: Version 7.0 or later
- Windows Server 2025 Evaluation ISO: Download from Microsoft evaluation center
- Network Range: 192.168.100.0/24 (can be modified)
- Primary DC IP: 192.168.100.10
- Secondary Server IP: 192.168.100.20
- Domain Name:
node.home(can be modified) - NetBIOS Name:
node(can be modified)
- Open VirtualBox and go to File → Settings → Network
- Click the + icon to create a new NAT network adapter
- Configure as follows:
- Name:
LAB-Network - IPv4 Prefix:
192.168.100.0/24
- Name:
-
Click New to create a new VM
-
Enter these settings:
- Name:
DC01(orNODE-DC01) - Type: Microsoft Windows
- Version: Windows 2025 (Windows Server)
- Memory: 4 GB (minimum)
- CPU Cores: 2 (minimum)
- Storage: 50 GB (dynamic allocation)
- Name:
-
Finish and create the VM
-
Configure the VM network:
- Right-click the VM and select Settings
- Go to Network
- Adapter 1:
- Attached to:
LAB-Network - Promiscuous Mode:
Allow All
- Attached to:
- Click OK
Repeat Step 2 with these changes:
- Name:
SRV01(orNode-SRV01) - Memory: 2 GB (minimum)
- CPU: 2 cores (minimum)
- Keep the same LAB-Network attachment
- Start the DC01 VM
- Press any key to boot from ISO
- Follow the Windows Setup wizard:
- Language, time, currency format: Leave defaults
- Install now
- Select Windows Server 2025 Standard Evaluation (Desktop Experience) for GUI
- Accept license terms
- Select Custom installation
- Choose the unallocated disk and proceed
- Installation will take 10-15 minutes
- Set the Administrator password when prompted (use a strong password)
- After login, Server Manager opens automatically
- Go to Local Server in the left panel
- Click the network adapter name (e.g., "Ethernet")
- Right-click the adapter and select Properties
- Double-click Internet Protocol Version 4 (TCP/IPv4)
- Configure:
- IP Address:
192.168.100.10 - Subnet Mask:
255.255.255.0 - Default Gateway:
192.168.100.1 - Preferred DNS Server:
192.168.100.10(itself)
- IP Address:
- Click OK and close network settings
- Rename the computer:
- Right-click This PC → Rename this PC
- Set to
DC01 - Restart the VM
- Open Server Manager (should be pinned to taskbar)
- Click Add roles and features
- Click Next until Server Selection
- Ensure
DC01is selected - On Server Roles, check Active Directory Domain Services
- Click Add Features when prompted
- Continue clicking Next
- On Confirmation, click Install
- Wait for installation to complete (2-3 minutes)
- Click Close
- In Server Manager, look for the notification flag
- Click Promote this server to a domain controller
- On the Deployment Configuration screen:
- Select Add a new forest
- Root domain name:
NODE.home - Click Next
- On Domain Controller Options:
- Forest functional level:
Windows Server 2025 - Domain functional level:
Windows Server 2025 - Check DNS server
- DSRM Password: Set a strong password (different from Admin password)
- Click Next
- Forest functional level:
- On DNS Options, click Next
- On Additional Options:
- NetBIOS domain name:
NODE - Click Next
- NetBIOS domain name:
- On Paths, leave defaults and click Next
- On Review Options, click Next
- On Prerequisites Check, click Install
- This will take 5-10 minutes
- The VM will automatically restart
- After restart, login with
NODE\Administrator - Open Server Manager → Tools → Active Directory Users and Computers
- You should see:
node.homedomain- Built-in containers (Users, Computers, Domain Controllers, etc.)
- Open DNS Manager (Tools → DNS):
- Expand the server
- Expand Forward Lookup Zones
- You should see
node.homezone
- Open Server Manager
- Click Add roles and features
- Click Next until Server Roles
- Check Active Directory Certificate Services
- Click Add Features when prompted
- Continue clicking Next until Confirmation
- Click Install
- Wait for completion and click Close
- In Server Manager, click the notification flag
- Select Configure Active Directory Certificate Services on the destination server
- On Credentials, leave defaults and click Next
- On Role Services, check:
- Certification Authority (required)
- Certification Authority Web Enrollment (optional but useful)
- Click Next
- On Setup Type, select Enterprise CA
- Click Next
- On CA Type, select Root CA
- Click Next
- On Private Key:
- Select Create a new private key
- Click Next
- On Cryptography:
- Provider:
RSA#Microsoft Software Key Storage Provider - Hash algorithm:
SHA256 - Key length:
4096 - Click Next
- Provider:
- On CA Name:
- Common name for the CA:
NODE-ROOT-CA - Validity period:
5years - Click Next
- Common name for the CA:
- On Database, leave defaults and click Next
- On Confirmation, click Configure
- Wait for configuration to complete (2-3 minutes)
- Click Close
- Open Server Manager → Tools → Certification Authority
- Expand the CA and right-click Certificate Templates
- Click Manage
- Right-click User template → Duplicate Template
- On the Compatibility tab:
- Certification Authority: Windows Server 2025
- Certificate recipient: Windows 10/11 or higher
- On the General tab:
- Template name:
NODE-User - Validity period:
2years - Renewal period:
6weeks
- Template name:
- On the Request Handling tab:
- Allow private key to be exported: Check this
- On the Subject Name tab:
- Include e-mail name in subject name: Check this
- On the Security tab:
- Select Domain Users and grant Enroll and Autoenroll permissions
- Click Apply → OK
- Close the Templates MMC
- Back in Certification Authority:
- Right-click Certificate Templates
- Click New → Certificate Template to Issue
- Select NODE-User and click OK
- Open Certification Authority in Server Manager Tools
- You should see your CA listed with green checkmarks
- Right-click the CA and select Properties
- Verify the certificate is installed with correct validity period
- Start the SRV01 VM
- Follow the same installation steps as DC01 (see Install Windows Server 2025)
- After reaching the desktop:
- Set Administrator password
- Disable Internet Explorer Enhanced Security (optional):
- Open Server Manager → Local Server
- Click On next to IE Enhanced Security Configuration
- Disable for Administrators and Users
-
Configure the static IP:
- IP Address:
192.168.100.20 - Subnet Mask:
255.255.255.0 - Default Gateway:
192.168.100.1 - Preferred DNS Server:
192.168.100.10(DC01) - Alternate DNS Server:
192.168.100.10
- IP Address:
-
Rename the computer:
- Right-click This PC → Rename this PC
- Set to
SRV01 - Restart
- After restart, right-click This PC → Properties
- Click Advanced system settings (right panel)
- Click the Computer Name tab
- Click Change
- In the Computer name field, enter
SRV01 - Under Member of, select Domain
- Type
node.home - Click OK
- When prompted, provide credentials:
- Username:
NODE\Administrator - Password: (your DC01 admin password)
- Username:
- Click OK
- You'll see "Welcome to the node.home domain"
- Click OK and restart the VM
After restart:
- Login with
NODE\Administrator(note the domain prefix) - Open Server Manager on DC01
- Go to Tools → Active Directory Users and Computers
- Navigate to node.home → Computers
- You should see both
DC01andSRV01listed
On DC01:
- Open Active Directory Users and Computers
- Right-click nodehome → New → User
- Create test users:
- John Smith (username:
jsmith) - Jane Doe (username:
jdoe)
- John Smith (username:
- For each user:
- Set a temporary password
- Check User must change password at next logon
- Click Finish
On DC01:
-
In Active Directory Users and Computers
-
Right-click node.home → New → Organizational Unit
-
Create these OUs:
ITSalesFinanceWorkstationsServers
-
Move
SRV01from Computers to Servers OU
On DC01:
- Open Group Policy Management (search in Server Manager → Tools)
- Navigate to Forest: node.home → Domains → node.home
- Create a new GPO:
- Right-click node.home → Create a GPO in this domain, and Link it here
- Name:
Password Policy
- Edit the GPO:
- Right-click Password Policy → Edit
- Navigate to: Computer Configuration → Policies → Windows Settings → Security Settings → Account Policies → Password Policy
- Set:
- Maximum password age: 90 days
- Minimum password length: 12 characters
- Password must meet complexity requirements: Enabled
- Close the editor
On SRV01:
- Open Certification Authority (search in Start menu)
- Click Request a certificate
- Click Request
- Select User or NODE-User template
- Click Enroll
- You should see "Certificate Issued" message
- Click View the properties of the issued certificate
If you installed Certification Authority Web Enrollment:
- On DC01, go to Server Manager → Local Server → Network connections
- Note the DC's IP address (192.168.100.10)
- From SRV01, open a web browser
- Navigate to
http://192.168.100.10/certsrv - You can request and retrieve certificates via the web interface
For a more realistic environment:
- On SRV01, open Server Manager
- Click Add roles and features
- Add File and Storage Services role
- On Role Services, check:
- File Server
- File Server Resource Manager
- Complete the installation
- Create shared folders for testing group policy and file permissions
# Check domain information
$env:USERDOMAIN
$env:USERDNSDOMAIN
whoami /groups
# Force group policy update
gpupdate /force
# Test DNS resolution
nslookup node.home 192.168.100.10
nslookup DC01 192.168.100.10
# View certificate store
certmgr.msc
# Check DC replication
repadmin /syncall /force
# View system event logs
eventvwr.mscPress Windows+R, type mmc, and add these snap-ins:
- Active Directory Users and Computers (
dsa.msc) - Active Directory Sites and Services (
dssite.msc) - Certification Authority (
certsrv.msc) - Group Policy Management (
gpmc.msc) - Event Viewer (
eventvwr.msc) - Services (
services.msc) - Device Manager (
devmgmt.msc)
Solution:
- Verify DNS is pointing to DC01's IP (192.168.100.10)
- On DC01, check DNS is running:
Services.msc→ look for "DNS Server" - Ping DC01 from SRV01:
ping 192.168.100.10 - Ensure both VMs are on the same network (
LAB-Network) - Check firewall isn't blocking ports 53 (DNS), 389 (LDAP)
Solution:
- Verify ADCS is running on DC01
- Check certificate template permissions (Domain Users need Enroll permission)
- Restart the DC and wait 5 minutes for template replication
- Try manual enrollment: Run
certmgr.mscand use Request New Certificate wizard
Solution:
- Verify both VMs are attached to
LAB-Networkin VirtualBox - Restart the VM's network adapter or restart the VM
- Check that VirtualBox network configuration is still present
- Re-run
ipconfig /alland reconfigure if needed
Solution:
- Wait 10-15 minutes (replication can take time)
- If still hung, check the log:
C:\Windows\Logs\Dcpromo.log - Try rebooting the VM
- Disable IPv6 if issues persist
- Add Subordinate CA: Create a subordinate CA on SRV01 for better testing scenarios
- Configure AutoEnrollment: Set up automatic certificate renewal for computers
- Implement PKI Hierarchy: Practice multi-level CA structures
- Add Workstation: Add a Windows 10/11 VM as a domain-joined workstation
- Configure Web Enrollment: Test certificate requests via web portal
- Implement SCEP: Set up Simple Certificate Enrollment Protocol
- Add Web Server Role: Install IIS and configure HTTPS certificates
- Regular Backups: Snapshot VMs regularly in VirtualBox
- Monitor Logs: Check Event Viewer for errors and warnings
- Certificate Renewal: Plan for CA certificate renewal (yearly check)
- Updates: Apply Windows updates periodically
- Documentation: Keep detailed notes of your configuration
- Use complex passwords for all accounts (minimum 12 characters)
- Enable Windows Firewall on all servers
- Regularly patch Windows and applications
- Limit RDP access to specific IP ranges
- Audit certificate requests and issuance
- Backup CA database regularly
- Test disaster recovery procedures
- Monitor CA logs for unauthorized activity
- Windows Server 2025 Documentation
- Active Directory Certificate Services Overview
- VirtualBox Manual
- Microsoft PKI Deployment Guide
| Component | Details |
|---|---|
| Host VM Memory | 8 GB per VM (16 GB total) |
| Host VM Storage | 100 GB per VM |
| Network | 192.168.100.0/24 (LAB-Network) |
| Primary DC | DC01 @ 192.168.100.10 |
| Secondary Server | SRV01 @ 192.168.100.20 |
| Domain | node.home (NODE) |
| OS | Windows Server 2025 Evaluation |
| CA Type | Enterprise Root CA |
| CA Name | NODE-ROOT-CA |
| CA Validity | 5 years |