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:
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
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.
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.
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.
7Restart 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
Question
Delly10 0
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:
Mapped drives are not available - Windows Client
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
Here's How:
1 Do step 2 (enable) or step 3 (disbale) below for what you want.
(Contents of REG file for reference)
This is the default setting.
(Contents of REG file for reference)
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
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.