Enable Mapped Drives to be Available in Elevated Command Prompt and PowerShell in Windows
By default, mapped drives are not available from an elevated command prompt, elevated PowerShell, or any other app running as administrator when UAC is configured to "Prompt for credentials" in Windows.
See also: KB3035277 Mapped drives are not available from an elevated prompt when UAC is configured to "Prompt for credentials" in Windows | Windows Support
This tutorial will show you how to enable or disable mapped drives availability from an elevated command prompt and elevated PowerShell in Windows 7, Windows 8, and Windows 10.
You must be signed in as an administrator to enable or disable mapped drives availability from an elevated command prompt or elevated PowerShell.
Here's How:
The downloadable .reg files below will modify the DWORD in the registry key below.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
EnableLinkedConnections DWORD
<delete> or 0 = Disabled
1 = Enabled
1 Do step 2 (enable) or step 3 (disable) below for what you would like to do.
A) Click/tap on the Download button below to download the file below, and go to step 5 below.
Enable_mapped_drive_available_in_elevated_command_prompt_and_PowerShell.reg
Download
This is the default setting.
A) Click/tap on the Download button below to download the file below, and go to step 5 below.
Disable_mapped_drive_available_in_elevated_command_prompt_and_PowerShell.reg
Download
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
Related Tutorials
- How to Map Network Drive or Disconnect Network Drive in Windows 10
- Add or Remove Map Network Drive and Disconnect Network Drive from This PC Context Menu in Windows 10
- How to Add or Remove a Network Location for This PC in Windows 10
- How to Open an Elevated Command Prompt in Windows 10
- How to Add 'Open command window here as administrator' context menu in Windows 10
- How to Open Elevated Windows PowerShell in Windows 10
- How to Add Open PowerShell window here as administrator context menu in Windows 10