Back to All Lab Write-ups
GROUP POLICY & WINDOWS SERVER CONFIGURATION

Group Policy Configuration & Testing Guide

Create and link Group Policy Objects (GPOs) for computer baselines, user preferences, and drive mappings. Learn to test policy application and troubleshoot common issues.

HomeLab Knowledge Base 7 min read Group Policy, GPO, Windows Server, GPRESULT, Security Baselines

This guide walks through creating, linking, and testing Group Policy Objects (GPOs) in your Active Directory domain. You'll learn how to configure security baselines, user preferences, and drive mappings while troubleshooting common issues.

Step 1: Create and Link Computer Baseline GPO

We'll create a GPO targeted at workstations in a specific Organizational Unit (OU).

Target: Workstations > NYC (or parent Workstations for domain-wide application)

  1. Open Group Policy Management.
  2. Expand lab.local > Workstations and right-click NYC.
  3. Select Create a GPO in this domain, and Link it here....
  4. Name it GPO_NYC_Workstations_Baseline.
Create GPO Dialog
Figure 1: Creating a new GPO in the NYC OU

Step 2: Configure Interactive Logon Banner & Power Settings

  1. Right-click GPO_NYC_Workstations_Baseline and click Edit.
  2. Navigate to:
    Computer Configuration > Policies > Windows Settings > Security Settings > Local Policies > Security Options
  3. Configure the banner:
    • Interactive logon: Message text for users attempting to log on"Authorized Access Only. All activity in the NYC domain is monitored."
    • Interactive logon: Message title for users attempting to log on"NYC Lab Security Notice"
  4. Navigate to:
    Computer Configuration > Policies > Administrative Templates > System > Power Management
  5. Enable Turn off hybrid sleep to prevent lab VMs from entering deep sleep during testing.
Security Options Configuration
Figure 2: Configuring logon banner and power settings in GPO editor

Step 3: Link User Policy for NYC Employees

Create a user policy that maps network drives and applies restrictions.

Target: Lab_Accounts > Employees > NYC

  1. In Group Policy Management, navigate to Lab_Accounts > Employees > NYC.
  2. Right-click NYCCreate a GPO in this domain, and Link it here....
  3. Name it GPO_NYC_User_Preferences.
User GPO Creation
Figure 3: Creating user preferences GPO for NYC employees

Configure Drive Mapping and Restrictions

  1. Right-click GPO_NYC_User_Preferences and Edit.
  2. Drive Mapping: Navigate to:
    User Configuration > Preferences > Windows Settings > Drive Maps
    • Map S: to \\lab.local\Shares\NYC_Data
  3. Control Panel Restriction: Navigate to:
    User Configuration > Policies > Administrative Templates > Control Panel
    • Set Prohibit access to Control Panel and PC settings to Enabled (or Enabled with specific access if testing standard user lockdowns)

Step 4: Verify Inheritance & Apply to Client

GPOs process from Top-Down (Site → Domain → Parent OU → Child OU). Linking at Workstations > NYC ensures only workstations in that container receive these rules.

Test Policy Application on Client

  1. Log onto WIN11-VM as a user in the NYC user OU.
  2. Open Command Prompt and run:
    gpupdate /force
    gpresult /r
  3. Review the output:
    • Under Computer Settings: GPO_NYC_Workstations_Baseline should show as Applied
    • Under User Settings: GPO_NYC_User_Preferences should show as Applied
GPRESULT Output
Figure 4: Verifying GPO application with gpresult /r command

Troubleshooting: Drive Mapping Not Loading

After running gpupdate /force, the mapped drive may not appear. Here's the common fix:

Missing Drive Mapping
Figure 5: Drive mapping not appearing in File Explorer

Root Cause: Shared Folder Doesn't Exist

The GPO references a share path that hasn't been created yet on the Domain Controller.

Solution: Create the Shared Folder

  1. On DC01, create the folder: C:\Shares\NYC_Data
  2. Right-click the folder → PropertiesSharing tab.
  3. Click Share... and add Domain Users with at least Read permissions.
Create Share Folder
Figure 6: Creating the shared folder on DC01
Share Permissions
Figure 7: Configuring share permissions for Domain Users

Update the GPO

Once the share exists, update the GPO to point to the correct path:

Correct Drive Mapping Policy
Figure 8: Updating the drive mapping GPO settings

Re-test on Client

  1. Run gpupdate /force again on the client.
  2. Open File Explorer.
  3. The NYC_Data (S:) drive should now appear.
Drive Mapping Success
Figure 9: Successfully mapped drive now appears in File Explorer

Key Takeaways

  • GPO Inheritance: Policies flow down the OU hierarchy. Child OUs inherit parent policies unless explicitly blocked.
  • GPUPDATE: Always run gpupdate /force after modifying GPOs on the client to immediately refresh policy application.
  • GPRESULT: Use gpresult /r to verify which GPOs are actually applied to a specific user/computer.
  • Shared Resources: Ensure network shares, UNC paths, and permissions exist before referencing them in GPOs.
  • Testing: Test GPOs on client machines before applying domain-wide to catch configuration issues early.
Pro Tip: Group Policy Search

Use the Group Policy Management Console search feature to quickly find specific policies. You can also export GPO configurations to XML for documentation and audit purposes.

All Articles Next Lab: pfSense + Proxmox