How to: list disks in Windows CMD

I guess everybody know their way with DIR command to list folder/drives content but what if you need to figure out which drives are available? I recently did a Windows Server 2012 core installation in native VHD boot scenario and it lead me to asking question above when trying to attach my VHDX file from Windows Setup Manager. So I decided to jot down options to list windows drive from CMD below:

1. WMIC option:

wmic logicaldisk get name

or:

wmic logicaldisk get caption

2. fsutil utility:

fsutil fsinfo drives

3. diskpart. This was actually was the only way to list drives I was able to remember from the top of my head – but I didn’t like it as it requires entering into diskpart context and working from there. And it is easy to do something unrecoverable from this context 🙂

list volume

4. PowerShell:

get-psdrive –psprovider filesystem

I draw most of the options from this article _ which features screenshots and more details on these commands.

Leave a Reply

Your email address will not be published. Required fields are marked *