≡ Menu

List mapped drives from command line

We can use below command to see the list of shares mapped as network drives.

c:\> net use




See also:
Delete mapped drives command line
Map drive to network share from command line



5 comments… add one
  • Manam Pervez

    How do we get list of Network map drives by running Powershell ??
    any idea?

    • DSRA

      This will list all mapped drives for the user running the PowerShell console.

      Get-WmiObject Win32_NetworkConnection | Select-Object RemoteName, LocalName | Sort-Object LocalName | Format-Table -AutoSize

    • AndyC

      For powershell I highly recommend this command to show mapped drives:
      Get-SMBMapping

      And here are 2 other commands you can use for similar effect.
      Get-PSDrive -PSProvider FileSystem | Select-Object name, @{n=”Root”; e={if ($_.DisplayRoot -eq $null) {$_.Root} else {$_.DisplayRoot}}}

      Get-WmiObject -Class Win32_MappedLogicalDisk | select Name, ProviderName

  • Hey

    Yes

  • ErnstS

    In powershell,
    Get-WmiObject Win32_NetworkConnection | ft "LocalName","RemoteName" -A
    does not show that error
    Regards

Leave a Comment