We can query these drives and the target shares behind them with a simple and easy powershell one liner. Read Also: Unmap network drive using cmd. In Windows 8, the same command run from an elevated prompt returns "There are no entries in the list". List All Mounted Drives and their Partitions from the Terminal There are several ways to list all the hard drives present in a system through Linux command lines. If you need to obtain a list of all disk drives on a Microsoft Windows system from a command line interface (CLI), e.g., a command prompt window, you can do so using Windows Management Instrumentation Command-line (WMIC).You can obtain a list of drives by opening a command prompt window and then issuing a wmic logicaldisk get command followed by parameters … Have a look! As administrator running an elevated in Win Vista+ when you run net use you get back all drives mapped, listed as unavailable. Right click on it and click on Run as Administrator. Mapped drives are the shares on remote computers for which you assigned a drive letter for easier access. In Linux, mount command mounts a storage device or filesystem, and let's go through commands that can display all those mounts. In this tutorial, I will show you the different ways to list mounted drives on Linux. I prefer to use a logout script that writes to a common share for all the users to capture user information like this. long story short for a server migration tomorrow i need to disconnect old, inconsistent mappings done via the user account to an older server, and set up a new (consistent) mapping to the new server. Note This issue also affects other applications that run in an elevated context (run as administrator) and use drive letters to access mapped drives. Keep in mind a hard drive could be physically connected, virtually connected or even emulated (for example: when you use storage devices such as EMC, Sun or IBM).. Here are some different commands which can list the hard drives, keep in mind there are others but … We can map a network drive from windows command line using the command net use.Syntax is given below. Steps to List Hard Drives Using Command Prompt in Windows 10. The universal command for the Windows operating system to map network drive from cmd is “net use”. In this article, I shall show you the commands you can use on Command Prompt, to list all hard drives. Open Windows Search menu. You are not able to see the mapped drives if the users are not logged in at the time you run your script - because their profile is not loaded on the machine. When you run an elevated command prompt as administrator, the mapped drives are unavailable in the elevated command prompt. net use z: \\remotepc\sharename The above command maps the drive letter Z: to the network share \\remotepc\sharename.If the logged in user has authorized access to this network share, the above command completes successfully without asking the user to provide … newly discovered reason to dislike mapped drives [scripted or otherwise]: managing them live is not a thing. Here is the tip of the day. The behavior is identical for powershell Get-WmiObject Win32_LogonSessionMappedDisk. As suggested above, use a GPO. Map Network Drive Command Line How to map network drive using cmd commands “net use” You can map a network drive from different ways but the cmd is like a “professional” way. We can use mount, findmnt, and df commands to list mounted device any Linux distribution like Ubuntu or Centos. Happy Learning. Get-WmiObject -Class Win32_MappedLogicalDisk | select Name Type Command Prompt, and Command Prompt application will appear in the search result.