Windows Active Directory

How to map network drives with Group Policy

How to map network drives with Group Policy

In earlier days, system administrators relied only on logon scripts to map networking drives, a complex and time-consuming process. To eradicate these hindrances, sysadmins rely on Group Policy to map network drives. In this article, we’ll learn why Group Policy is preferred and how you can map networking drives with GPO.

Why use Group Policy drive mapping

Using Group Policy to map network drives helps you to:

Enhance pliability while managing drive by using item-level targeting to apply preference settings to either group or individual user and computer

Steps to map a network drive using Group Policy on Windows Server 2012  R2

1. Open Group Policy Management in Active Directory

or

2. Create a new GPO to map the drive

3. Modify the GPO settings

    4. Configure drive properties

In the General tab, configure the settings below:

  1. Choose one of the following options from the Action dropdown list box
  1. Location: Enter the path to the drive to be mapped.
  2. Reconnect: Enable this check box to reconnect automatically irrespective of policy removal.
  3. Drive letter: Assign a letter for the drive.
  4. Label as: Assign a suitable name for the drive (e.g., SharedDrive).
  5. Connect as: Use either current user account credentials or credentials of different accounts.
  6. Hide/Show this drive: Choose whether you want to hide or show the mapped drive in windows explorer.
  7. Hide/Show all drives: Choose whether you want to hide or show all the drives (mapped and physical) in windows explorer.
  8. Click Apply and then, Ok to save the settings.

In the Common tab, configure these additional settings:

  1. Choose Item-level targeting, and click Targeting.
  2. In the Targeting Editor window, click New Item.
  3. Choose Security Group among the items listed.
  4. Click and enter the name of the security group.
  5. Click Ok to close the Targeting Editor window.
  6. Click Apply and then Ok to close the Drive properties.

To check if the policy is applied, you can run gpupdate in command prompt, and as soon as the GPO is updated, you can find the mapped drive in File Explorer.

Mapping network drives with GPO for individual users

If you want to map network drive for individual users, you need to create a folder with your user’s logon name or sAMAccountName in the file server and then, follow the below steps:

  1. In Group Policy management console, create a GPO and link it to domain.
  2. Right-click on the newly created GPO > Edit.
  3. In the Group Policy management editor,
    1. Click User configuration > preferences > windows settings.  
    2. Right-click on Drive maps > New > Mapped drives
  4. In the new drive properties, choose an action ( e.g., Update) and enter a file server path with %UserName%, as the user’s logon name. Fill in the other fields, then click Apply and Ok. 

Observations and tips

Once Group Policy is applied, the mapped drive will show up almost immediately. If it does not appear, you need to do either of the following:

Final thoughts

We have learned how to map network drives using GPO and found it to be one of the easiest and simplest methods of mapping, unlike the regular logon scripts which require scripting knowledge and experience. Also, the item-level targeting is helpful for focusing on individual users, enabling you to manage them efficiently.

Exit mobile version