Jump to content
  • 0

Enable or Disable Mapped Drives Available in Elevated Command Prompt in Windows 11


Delly10

Question

Network_drive_banner.webp

This tutorial will show you how to enable or disable mapped network drives availability in an elevated terminal (command prompt and PowerShell) when UAC is enabled in Windows 11.

You can Map a network drive to access shared files on it from File Explorer in Windows without having to look for it or type its network address each time.

When UAC is enabled, the system creates two logon sessions at user logon. Both logon sessions are linked to one another. One session represents the user during an elevated session, and the other session where you run under least user rights.

When drive mappings are created, the system creates symbolic link objects (DosDevices) that associate the drive letters to the UNC paths. These objects are specific for a logon session and are not shared between logon sessions.

When the UAC policy is configured to Prompt for credentials, a new logon session is created in addition to the existing two linked logon sessions. Previously created symbolic links that represent the drive mappings will be unavailable in the new logon session.

The EnableLinkedConnections registry entry forces the symbolic links to be written to both linked logon sessions that are created, when UAC is enabled.

Reference:
learn.microsoft.com

Mapped drives are not available - Windows Client

Describes an issue in which mapped drives are unavailable from an elevated command prompt.
learn.microsoft.com

You must be signed in as an administrator to enable or disable mapped network drives availability from an elevated terminal (command prompt and PowerShell) when UAC is enabled.



EXAMPLE: "EnableLinkedConnections" Enabled or Disabled for mapped network drive availability in elevated prompt with UAC enabled

Mapped_drives_available_from_elevated_prompt-enabled.webp
Mapped_drives_available_from_elevated_prompt-disabled.webp

Mapepd_network_drive-Z.webp




Here's How:

1 Do step 2 (enable) or step 3 (disbale) below for what you want.

2 Enable Mapped Drives Availability from Elevated Prompt

A) Click/tap on the Download button below to download the file below, and go to step 4 below.​

Enable_mapped_network_drive_available_in_elevated_command_prompt_and_PowerShell.reg

Download

(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
"EnableLinkedConnections"=dword:00000001

3 Disable Mapped Drives Availability from Elevated Prompt[

This is the default setting.


A) Click/tap on the Download button below to download the file below, and go to step 4 below.​

Disable_mapped_network_drive_available_in_elevated_command_prompt_and_PowerShell.reg

Download

(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
"EnableLinkedConnections"=dword:00000000

4 Save the .reg file to your desktop.

5 Double click/tap on the downloaded .reg file to merge it.

6 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

7 Restart the computer to apply.

8 You can now delete the downloaded .reg file if you like.


That's it,
Shawn Brink


Related Tutorials

  • Change User Account Control (UAC) Settings in Windows 11
  • Open Elevated Windows Terminal as Administrator in Windows 11
  • Map Network Drive in Windows 11
  • Disconnect Mapped Network Drive in Windows 11
  • Add or Remove "Map network drive" and "Disconnect network drive" context menu in Windows 11
 
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • AD
  • Recent Status Updates

    No Recent Status Updates
  • Most Solved

    Nothing has been solved this week.

×
×
  • Create New...