To map \\dd.contoso.com\instal1 as drive H for all users using Group Policy Preferences and ensure that the new drive mapping takes precedence over any existing mappings, follow these steps:
Step 1: Open Group Policy Management Console Open the Group Policy Management Console (GPMC) on a machine that has administrative privileges over the domain.
Step 2: Create or Edit a GPO Create a new Group Policy Object (GPO) or edit an existing one that applies to the users who need the drive mapping.
Step 3: Navigate to Drive Mappings In the GPO Editor, navigate to:
User Configuration -> Preferences -> Windows Settings -> Drive Maps
Step 4: New Drive Mapping Right-click on Drive Maps and select New -> Mapped Drive.
Step 5: Configure Drive Mapping In the New Drive Properties window, configure the following settings:
Action: Select Replace. This action will overwrite any existing mappings with the same drive letter.
Location: Enter the UNC path \\dd.contoso.com\instal1.
Drive Letter: Choose H: from the drop-down menu.
Reconnect: Check this option if you want the drive mapping to persist across logon sessions.
Label As: Optionally, provide a label for the drive mapping.
Hide/Show this drive: Set according to your preference.
Hide/Show all drives: Set according to your preference.
Step 6: Common Tab Go to the Common tab and configure the following:
Run in logged-on user’s security context (user policy option): Check this option.
Item-level targeting: Click on Targeting and set up any specific criteria if needed.
Step 7: Apply the GPO Click Apply and then OK to save the drive mapping configuration.
Step 8: Link the GPO Link the GPO to an Organizational Unit (OU) or domain that contains the users who should receive the drive mapping.
Step 9: Update Group Policy Instruct users to log off and log back on, or use the gpupdate /force command to refresh Group Policy on their computers.