- VirtualBox installed
- Windows Server 2019 ISO
- At least 2 GB RAM, 2 CPUs, 50 GB storage
-
Create a new VM in VirtualBox:
- Name:
Windows Server 2019 - Type: Microsoft Windows
- Version: Windows 2019 (64-bit)
- Network: Bridge Adapter
- Name:
-
Attach the Windows Server 2019 ISO and start the VM.
-
Follow the installer:
- Choose Windows Server 2019 Standard (Desktop Experience)
- Choose Custom installation
- Create a new partition and proceed
-
Set the Administrator password when prompted.
After installation:
-
Login as Administrator.
-
Open Server Manager.
-
Change the computer name:
- Server Manager → Local Server → Computer Name → Change
- Example name:
DC01
-
Set a static IP address:
-
Local Server → Ethernet
-
In the Network Connections window, right-click the active network adapter, then Properties.
-
Select Internet Protocol Version 4 (TCP/IPv4), then Properties.
-
Set IPv4 to something like:
IP: 192.168.56.10 Subnet: 255.255.255.0 Gateway: 192.168.56.1 (or leave empty) DNS: 192.168.56.10 (self)
-
-
Open Server Manager → Manage → Add Roles and Features.
-
In Installation Type select Role-based installation → Select your server.
-
On the Roles screen, check:
- ✅ Active Directory Domain Services
- ✅ DNS Server (check if not auto-selected)
-
Click Next → Install.
-
After installation completes, do not restart yet.
- In Server Manager → Click the Notification flag icon in the top bar.
- Select “Promote this server to a domain controller”.
- Select Add a new forest, enter
lab.local, click Next. - Choose Forest Functional Level and Domain Functional Level (default is fine).
- Set a DSRM password (Directory Services Restore Mode).
- Keep defaults for DNS and NetBIOS name.
- Confirm and click Install.
- The server will reboot automatically after promotion.
- After reboot, log in as
lab\Administrator. - Open Server Manager. You should now see AD DS and DNS listed as roles.
- Open Active Directory Users and Computers. You should see the new domain:
lab.local.
-
Press
Win + S, typeActive Directory Users and Computers, and press Enter — or — PressWin + R, typedsa.msc, and press Enter — or — Open Server Manager → Tools → Active Directory Users and Computers. -
Expand your domain (e.g.,
lab.local) to view existing containers.
-
Right-click the domain (e.g.,
lab.local) → New → Organizational Unit. -
Name the OU (e.g.,
Users,Computers,Admins,LabClients). -
Repeat to organize your lab structure logically:
LabUsersITAdminsTestAccounts
- Right-click an OU (e.g.,
ITAdmins) → New → Group. - Provide a Group Name (e.g.,
Helpdesk,LocalAdmins). - Choose group scope/type (default:
Global / Securityis fine for now). - Click OK.
-
Right-click the OU you created (e.g.,
LabUsers) → New → User. -
Fill in:
- First name:
Test - User logon name:
testuser1
- First name:
-
Set a password (e.g.,
P@ssword123). -
Uncheck "User must change password at next logon".
-
Click Finish.
Repeat for more users like:
testuser2adminuser
- Right-click the user you just created → Add to a group....
- Type the name of the group (e.g.,
ITAdmins) and click Check Names. - Click OK to confirm.
-
Press
Win + R, typegpmc.msc, and press Enter. — or — PressWin + S, typeGroup Policy Management, and press Enter — or — Go to Server Manager → Tools → Group Policy Management. -
Expand your forest and domain:
- Expand your domain.
- Right-click Group Policy Objects → New.
- Name your GPO (e.g.,
PasswordPolicy,UserRestrictions,AuditPolicy). - Click OK.
You can create multiple GPOs based on purpose or keep all settings in one.
- Right-click your new GPO → Edit.
- Apply settings under:
- Navigate to
Computer Configuration → Policies → Windows Settings → Security Settings → Account Policies → Password Policy- Enforce password history:
24 - Maximum password age:
30 - Minimum password length:
12 - Password must meet complexity requirements:
Enabled
- Enforce password history:
- Navigate to
Computer Configuration → Policies → Windows Settings → Security Settings → Advanced Audit Policy Configuration → Audit Policies.- Logon:
Success,Failure. - Privilege Use:
Success,Failure.
- Logon:
- Navigate to
- Right-click the OU (e.g.,
LabUsers) → Link an Existing GPO. - Choose your GPO (e.g.,
PasswordPolicy) and click OK.
-
Open Command Prompt or PowerShell as Administrator and run:
gpupdate /force -
Verify:
auditpol /get /category:*
-
Check logs in Event Viewer → Windows Logs → Security
Look for:
4624: Successful login4625: Failed login4672: Admin privilege assigned
- Already logs security, system, and application events
- No installation needed
To view logs:
-
Press
Win + R, typeeventvwr.msc -
Check:
Windows Logs → SecurityWindows Logs → System
To store logs for long-term usage:
- Open Event Viewer → Right-click Security
- Choose Properties
- Increase log size (e.g., 128 MB)
- Enable Overwrite events as needed
You can install third-party tools for better log management:
- Sysmon logs detailed process creation and network events
- Must be manually installed via shared folder or ISO
These are optional for now — default Event Viewer is enough for basic auditing.
-
Open Notepad or PowerShell ISE.
-
Paste the following script:
$date = Get-Date -Format "yyyy-MM-dd" $logPath = "C:\Logs" if (-not (Test-Path -Path $logPath)) { New-Item -Path $logPath -ItemType Directory | Out-Null } Get-ComputerInfo | Out-File -FilePath "C:\Logs\systemdata_$date.txt"
-
Save the file with
.ps1extension:
-
Open PowerShell as Administrator.
-
Navigate to the folder where your
.ps1file is saved. -
Run the script:
.\systeminfo_logger.ps1
This will:
- Create a folder
C:\Logsif it doesn’t exist. - Save system information to a file named:
C:\Logs\systemdata_YYYY-MM-DD.txt - Create a folder
-
Go to
C:\Logsdirectory. -
You should see a text file named something like:
systemdata_2025-06-26.txt -
Open the file — it will contain detailed information about:
- OS version
- BIOS
- Network interfaces
- System uptime
- Hardware details, and more
-
Open Group Policy Management.
-
Right-click Group Policy Objects → New.
-
Name your GPO (e.g.,
DisableLLMNR). -
Right-click the GPO → Edit
-
Navigate to
Computer Configuration → Policies → Administrative Templates → Network → DNS Client -
Find and double-click Turn Off Multicast Name Resolution.
-
Select:
- Enabled
- Click Apply → OK
NetBIOS needs to be disabled per network adapter via GPO or manually.
Create a PowerShell script and deploy it via GPO to disable NetBIOS:
$adapters = Get-WmiObject Win32_NetworkAdapterConfiguration | Where-Object { $_.IPEnabled }
foreach ($adapter in $adapters) {
$adapter.SetTcpipNetbios(2)
}-
Open Network and Sharing Center → Change adapter settings
-
Right-click active adapter → Properties
-
Select Internet Protocol Version 4 (TCP/IPv4) → Click Properties
-
Click Advanced → Go to WINS tab
-
Select:
- Disable NetBIOS over TCP/IP
-
Click OK on all dialogs.