Get-MappedDrive - Get list of locally mapped network drives

This function requires PowerShell 2.0 and utilizes the Wscript.Network COM object to enumerate the locally mapped network drives. The output of the Wscipt.Network COM object is a collection of strings. This function takes those strings and converts it into objects.

1,401 times
Add to favorites
E-mail Twitter Digg Facebook
  • Empty results
    1 Posts | Last post June 13, 2016
    • On a Windows 10 Pro, when I run this I get blank results but net use shows me the mapped drives.
      Are there any particular pre-requisites to run this?
  • Use examples
    2 Posts | Last post April 24, 2015
    • Can you give me an example as to how I would run this? I am not getting any results when I dot source it. Server 2008 R2, PS ver 2.0
    • Sure, you can run it by typing the following line of code:
      . .\Get-MappedDrive.ps1;Get-MappedDrive
      Do you have mounted drives though, otherwise it will indeed not display any information. If you have mounted drives make sure that you are running your console non-elevated otherwise shares might not show up because of the split token if you are an administrative user. Have a look at this article for more information: