MICROSOFTWindows 10Windows 11Windows Server 2022

How to Map Network Drives via Group Policy

In this blog, you will learn how to map network drives via Group Policy in Windows Server 2022. How can I configure a GPO for mapping shared drives and automatically provide users with access when they log on? Providing users with access to shared folders can be beneficial. It allows you to control your IT infrastructure while allowing people to share the necessary resources.

Map Network Drives via Group Policy

Map a Department Network Drive

I will map network drives with group policy for the Accounts department. I will use item-level targeting, so it only maps this drive for users in the Accounts organization unit.
You could also use a Security Group to target a certain group of users. This will be mapped to a network share that only the HR department has access to.
I have created two shared folders (Shared for Accounts department and Users for individuals).

Open the users’ folder.

Windows explorer new volume

Right-click on a user, select properties and verify the permissions.

Folder properties in Windows

Active Directory Users and Computers

We have created organization units (Account, etc.….) in the Active Directory users and computers. I am going to map a network drive for accounts departments. I have moved a user named user2 to the accounts organization unit.

Active directory users and computers

Open the Group Policy Management Console by searching in Windows.

Search group policy management

In the Group Policy Management Console, click on the group policy object and select Create a new GPO.

Create new group policy object

You can name the new GPO whatever you like; I’ve created a map network drive for all computer users.
I can also add additional drive mappings to this GPO.

New GPO name

The new GPO is now created and linked, so it is time to configure the settings.

Configure GPO Settings

Right-click on the GPO (Map Network Drives) and select edit.

Edit group policy objects

Access User Configuration/Preferences/Windows Settings/Drive Mappings.
Right-click Drive Maps, Select New and then Mapped Drive.

Map network drives via GPO

Configure Drive Mapping Properties

General Tab Settings
Action updates
Locate the path to the shared/folder you want to map a drive.
Select a drive letter
Label as: This is optional, but may be beneficial for users.

Configure map network drive via GPO

Click on the Common Tab
Select Run in the logged-on user’s security context.
Select Item-level Targeting
Click on the Targeting Button

Map network drive targeting

Select New Item
Select Organization Unit

targeting Map network drive

Click on the three dots buttons.

Map network drive targeting editor

Select your OU, the one you want to use for this network drive mapping.

Find custom search

Click ok.

Map network drive targeting

Click the ok button to close the new drive properties.

New map drive properties

This completes the GPO settings.

Group policy management editor

This will be a user-based GPO, so make sure you link it to a location that will attract users. I have all my users separated into an OU called Accounts so that I can create and link the GPO there.

Right-click on an Organization Unit and select the existing GPO.

Group policy management

Select a group policy object (Map Network Drives) and click ok.

Link existing group policy objects

Now you can see the GPO successfully linked.

Group policy objects link enabled

Log in with a user’s PC, and you can see the map drive not displayed.

This PC

Reboot User’s Computer to Process GPO

I must reboot the user’s PC or run gpupdate /force.

Gpupdate /force

The next time a user from the accounts users logs in, they should be able to see a mapped drive.

This PC mapped network drives

In the active directory users and computers, now, any user I put in the HR folder can access this drive. If you don’t want to use an organizational unit, you can also target a group of users by using a Security group.

Active directory users and computers

Map a Network Drive Using Group Policy for Individual Users

This example maps a drive for individuals, providing each user with a personal folder to save files.
You can create a new GPO or add to an existing one, I have all my drive mappings available in one GPO.

This example requires a folder to be created on a network share that matches the user’s login name. You will need to modify the NTFS permissions so that only the individual user has permission to access it.

Create Roaming Profiles

Roaming profiles allow users to log on to any computer in their organization and have all their personal files and settings available to that computer. This is a powerful feature that is easy to configure.
Create a folder on your server’s local hard drive.
Click the folder you created, scroll down, and click Properties.

Select folder properties

Open the sharing tab and click Advanced Sharing.
Check the Share this Folder and click on Permissions.
Select Everyone from Group or usernames and click Remove.
Click Add and add a user to who you want to provide access.
Click on the security tab and select edit.

Folder properties security tab

Select add

Permissions for shared folder

Enter a user and select click ok.

Enter the object name to select

Allow full control by checking the checkboxes and clicking OK.

Permissions for share folder

Active Directory Users and Computers

Select all users who would like their roaming profile to be created. Right-click and click Properties.

active directory users and computers

Check the connect under the home folder and use a letter to map the network drive. Provide the network path of the folder you copied. It should be in the format \ServerName\FolderName\%username%. Click OK. You are creating a roaming profile for Active Directory users.

Map network drive for user

Click ok.

Active directory domain services warning

Now login with the user’s PC.

Map network drive

Please visit Microsoft to learn more about GPO.

#MapNetworkDrive #GroupPolicy #WindowsServer2022 #gpo

Jamil Parvez

Jamil Pervez works as a Network Administrator, based in Kuwait with a Primary focus on Microsoft technologies. Microsoft Certified MCSE, MCTP, MCITP, CCNP, CCIP, CCVP with 20 years of experience in administering Windows Servers, Exchange, VMWare, Veeam B&R, Veritas BackupExec.

Related Articles

Leave a Reply

Back to top button