List Disk and Volume Information for Disks on Command Line with Diskpart

This article was posted more than 1 year ago. Please keep in mind that the information on this page may be outdated, insecure, or just plain wrong today.

Here’s a one-liner to list disk and volume information for attached disks in Windows from the command line. Requires administrative permission since it uses Diskpart.
@echo list disk >list.dp && @echo list volume >>list.dp && diskpart -s list.dp

Leave a Comment