Joining VM to Domain:
Step 1: Set Network Configuration
Configure DNS
IPv4 Properties:
- IP: 192.168.1.x
- Subnet: 255.255.255.0
- Gateway: 192.168.1.1
- DNS: [YOUR DC's IP - e.g., 192.168.1.10]
- Alternate DNS: Leave blank or 8.8.8.8
Step 2: Test DNS Before Joining
In Command Prompt:
# Test DNS resolution
nslookup lab.local# Should return your DC's IP
ping dc01.lab.local# Should ping successfully
nslookup -type=srv _ldap._tcp.lab.local# Should show your DC
```
**If these fail, STOP! Fix DNS first.**
---## Step 3: Join the Domain### **Method A: GUI (Easiest)**
```
1. Right-click "This PC" → Properties
2. Click "Rename this PC (advanced)"
3. Click "Change" button
4. Select "Domain" radio button
5. Type: lab.local
6. Click OK
7. Enter credentials:
- Username: Administrator
- Password: [your DC admin password]
8. "Welcome to the lab.local domain!"
9. Restart required
Method B: PowerShell
# Run as Administrator
Add-Computer -DomainName "lab.local" -Credential LAB\Administrator -Restart# When prompted, enter admin password
```### **Method C: Settings App (Windows 10/11)**
```
1. Settings → Accounts → Access work or school
2. Click "Connect"
3. "Join this device to a local Active Directory domain"
4. Domain name: lab.local
5. Enter LAB\Administrator credentials
6. Restart
```
---## Step 4: After Restart### **Login with Domain Account:**
```
At login screen:
- Click "Other user"
- Username: LAB\bsmith
or: bsmith@lab.local
- Password: P@ssw0rd123!
Step 5: Move Computer to Correct OU
On your Domain Controller:
powershell
# Check where computer landed
Get-ADComputer -Filter * | Select Name, DistinguishedName# Move to correct OU (example)
Move-ADComputer -Identity "COMPUTER1" `
-TargetPath "OU=TestComputers,OU=LAB,DC=lab,DC=local"
```
Or via GUI:
```
1. On DC: Active Directory Users and Computers
2. Expand lab.local → Computers container
3. Find new computer
4. Right-click → Move → Select target OU
```
---## Common Issues & Fixes### **"Domain cannot be contacted"**
```
Fix: Check DNS!
- Must use DC's IP as DNS
- ipconfig /all - verify DNS server
- Try: ipconfig /flushdns
```
### **"The specified domain does not exist"**
```
Fix:
- Verify domain name: lab.local (not just "lab")
- Check network connectivity to DC
- Ensure DC is running
```
### **"Access Denied"**
```
Fix:
- Use: LAB\Administrator or Administrator@lab.local
- Check password
- Ensure account isn't locked
```### **"Network path not found"**
```
Fix:
- Windows Firewall blocking
- Temporarily disable firewall on both machines
- Check network profile (should be Private/Domain, not Public)
Quick Troubleshooting Commands
powershell
# On the computer trying to join:# Check DNS
ipconfig /all
nslookup lab.local# Test DC connectivity
ping 192.168.1.10 # Your DC IP
Test-NetConnection -ComputerName dc01.lab.local -Port 445
Test-NetConnection -ComputerName dc01.lab.local -Port 135# Reset if needed
ipconfig /release
ipconfig /renew
ipconfig /flushdns
```
---## After Successfully Joining
You can:
1. **Login with domain users** (LAB\bsmith, etc.)
2. **GPOs will apply** (your legal notice should appear!)
3. **Access domain resources**
4. **See computer in AD**
---## Your Specific Setup
For your lab.local domain:
```
Domain: lab.local
NetBIOS: LAB
Admin: LAB\Administrator
Users: LAB\bsmith, LAB\ajones, LAB\cbrown
DC IP: [Your DC's IP - check with ipconfig on DC]