Home > Enterprise >  DISKPART in Powershell Win10/11 How do I list all drive letters including logical network drives and
DISKPART in Powershell Win10/11 How do I list all drive letters including logical network drives and

Time:03-16

Powershell image from my Home computer before installing more capacity network drivesSome friends of mine at work recently asked me how to list all drives, including virtual network, physical drives, and DVD drives connected through USB in a clean, neat list in Powershell-admin without all the mess of Get-PSDrive showing other gibrish and unclear information.

You can do this with two simple commands in an aesthetic neat table-format, and as you add more drives to your system, you can simply hit the 'up arrow key', [ENTER] to continuously refresh the drive list.

Open Powershell (Admin-PS is optional here). Next type or copy/paste the command:

Get-Disk

Next you would probably like to know how much free space is available on each drive in GB. That is done with the command wmiobject plus a math script. Here you really need to copy and paste, as this takes an hour to type (pun intended) This cannot be typed into Stackoverflow_com so I will provide it in the screenshot. Be sure to type it out for copy and paste later, then save it to a note document like I have shown in my notes at the top. Type it like this: [See screenshot]

Clean up the screen and clear it when done (optional) by typing the command: cls

Sincerely, Exsosus

Linux sys and Windows sys administrator.

CodePudding user response:

Here is the result after the added drive(s) are added. D: standard network drive and G: iSCSI added from storage server

CodePudding user response:

Thank you! This helped me show the missing bluray drive on my laptop which wasn't shown in My PC.

  • Related