PowerTip: Use PowerShell to List All Volumes

Doctor Scripto

Summary: Use Windows PowerShell to identify all partitions on a disk drive.

Hey, Scripting Guy! Question How can I use Windows PowerShell to easily see all of the partitions on a disk drive?

Hey, Scripting Guy! Answer Pipe the Disk object through Get-Partition (to identify its partitions), then pipe that through Get-Volume to get
           the volume data. Here is an example of using this on the default hard drive (drive 0):

Get-Disk –number 0 | Get-Partition | Get-Volume


Discussion is closed.

Feedback usabilla icon