How to Map Network Drive using Group Policy Preferences?

 How to Map Network Drive using Group Policy Preferences?

  1. We are going to a Map drive for the HR Department.

Double click on the HRUser Group > Member tab

You can see we have only one member added in the Security Group ( HR User1).

  1. Before creating a Group Policy, let’s create one HRSharedData Folder in the file server or for a test you can create in the DC1 server also.

    1. Right -click on HRSharedDATA folder > Properties >Sharing Tab > advanced Sharing

    2. Chick on “Share this folder”  > click on OK.

  1. You should copy the Network Path: we need that path later on. And  click on close.

  2. Now it's time to create a GPO.

    1. In DC1 server, Click on Tool > Group Policy Management option.

    2. You should see GPO windows


  • Now, click on Domains > mylab.local > Group Policy Objects 

  • Right-Click on GP object > click on New

  • In New GPO

  • Give Name: like below and 

  • Click ok.

You  can see the GPO in the left side column.


  1. Now we should have to configure or edit the created GPO so 

    1. Right click on Just created GPO > Edit

This is User base policy so we have to click on User Configuration >

  • Click on Preferences > Windows Settings > Drive Maps

  • Then Right click on Drive Maps > New > Mapped Drive

  • Select General tab, in action = select Create

  • In Location > paste our previous folder path.

  • In Reconnect: label as: you can put any label name.

  • Choose Drive letter : use = M: drive from list.

  • Select Common Tab, 

  • Checked on “run in logged-on ….” options

  • And checked on Item-level targeting

    • Click on the Targeting button. > Click on New Item

    • And choose Security Group from the list.

In Targeting Editor:

Now we have to define the security group name. So click on the Group's three dots … button.

Now you should select group or you can type the group name directly.  And click on ok.

(Note: I use only one user here, but you can add the whole HR group here. If you add a Group name the policy will apply for whole users once.)


Now you can see the all information of Security Group

Then click on Ok button,> click on Apply button > and OK button.

  • We have successfully defined the setting to create a Map drive M: on a client computer and  we have defined setting as well for the admin level targeting. 

  • Now close the GPO console.


  1. Now time to Link the Group policy Object to the HR group. 

  • Right click on HR OU > Link an Existing GPO…

  • Select the “ Group Policy Objects: from the list :  Map Network drive using Group policy preferences GPO. and click on OK.


  1. In DC, Now Open CMD prompt and run gpupdate /force command.

  2. Open any domain computer >  login with any users which are part of HR OU.  


Now Open File Explorer: you should see the Test (M:) drive

The policy is successfully applied in client computers.


  1. If you want to apply this policy to newly added users, you should run the command : gpupdate /force in user computer.

  2. (Note: don’t forget to add your client computer in the domain.)

  3. If you want to add more drive in the same time for the same group or different group you should add Drive maps like below.


The End


Comments

Popular posts from this blog

Intune Windows Autopilot Steps-by-Step.

How to set up a Shared folder in Windows Server 2022?