Author Posts

December 15, 2017 at 1:11 pm

If I use PowerShell with get-psdrive or even the good old Net Use command it works fine and lists the local PC's network drives.
If I Run PowerShell as Administrator neither command lists the network drives and get-psdrive only lists the local drives.
Tested this with Windows 10 (10.0.14393 LTSB) and Windows Server 2012 R2 (6.3.9600) with GPO mapped drives.
Just tested on Windows 10 pro insider preview (10.0.17046.1000) this is in a workgroup and drives mapped through file explorer with same issue when PowerShell elevated.

December 15, 2017 at 1:58 pm

Are you really sure that you have a network drive in your administrative session? If I'm not wrong you will have to map a network drive before you're able to use it. I would recommend to use unc paths anyway.

December 15, 2017 at 2:17 pm

From the help file

Get-PSDrive cmdlet gets the following types of drives in the current session:
– Windows logical drives on the computer, including drives mapped to network shares.
– Drives exposed by Windows PowerShell providers (such as the Certificate:, Function:, and Alias: drives) and the HKLM: and HKCU: drives that are exposed by the Windows PowerShell Registry provider.
– Session-specified temporary drives and persistent mapped network drives that you create by using the New-PSDrive cmdlet.

From PowerShell v3 onwards if you use the -Persist parameter with New-PsDrive then mapped network drives will be visible between PowerShell sessions

How did you create the mapped drives?

December 15, 2017 at 3:52 pm

Thanks for quick response.
Network drives are already mapped via group policy and accessible from file explorer and cmd prompt.
Network drives can be listed from PowerShell console and ISE but not if either Run as Administrator. If PowerShell console or ISE run as administrator neither get-psdrive or "Net User" list the network drives.
"Welcome to the Twilight Zone"