How to Map a Network Drive Using Group Policy Preferences in Windows Server

Moving Away From Logon Scripts

For decades, IT administrators mapped network drives for users by creating complex .bat or .vbs logon scripts using the net use command. These scripts are difficult to maintain, prone to execution errors, and drastically slow down the user login process. Group Policy Preferences (GPP) provides a modern, graphical, and incredibly fast method to map network drives directly through Active Directory, allowing you to easily target specific drives to specific users without writing a single line of code.

Step 1: Open the Group Policy Management Console

Log in to your Domain Controller. Open the Group Policy Management Console (GPMC).

Navigate to the Organizational Unit (OU) that contains your Users (not Computers, as drive maps are user-specific). Right-click the OU and select Create a GPO in this domain, and Link it here…. Name it “User – Drive Maps” and click OK.

Step 2: Navigate to the Drive Maps Preference

Right-click your newly created GPO and select Edit.

In the Group Policy Management Editor, drill down to the following path:

User Configuration > Preferences > Windows Settings > Drive Maps

Step 3: Create the New Mapped Drive

Right-click in the empty right-hand pane, select New, and click Mapped Drive. The New Drive Properties window will appear.

Configure the general settings:

  • Action: Set this to Update. (This will create the drive if it doesn’t exist, and update its settings if it does).
  • Location: Enter the UNC path to your network share (e.g., \\fs-01.corp.local\MarketingData).
  • Label as: Type the friendly name the user will see in File Explorer (e.g., “Marketing Share”).
  • Drive Letter: Select the radio button for Use and pick a specific letter from the dropdown (e.g., M:).

Step 4: Configure Item-Level Targeting (Optional but Powerful)

If you linked this GPO to an OU containing 500 users, you probably don’t want all 500 users getting the “Marketing Share” drive. Item-Level Targeting allows you to dynamically apply this single drive map only to members of a specific security group.

Click the Common tab at the top of the properties window. Check the box for Item-level targeting, then click the Targeting… button.

Click New Item > Security Group. Click the button and search for your Active Directory group (e.g., SG-Marketing-Dept). Click OK, then OK again to save the drive map. Only users inside that specific group will receive the M: drive.

Step 5: Test the Configuration

Log in to a Windows 10 or 11 client machine as a standard user who belongs to the Marketing security group.

Open the Command Prompt and force a policy refresh by typing gpupdate /force. When the update completes, open File Explorer and click on “This PC”. The new M: drive will instantly appear, fully labeled and ready for use, completely eliminating the need for legacy logon scripts.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.