Windows – Finding which partition on a particular disk is active from the command line

command linepartitioningwindows

For example, if I'm booted from Windows PE, or remoting into a system using psexec or another command-line based method. I know that diskpart.exe allows you to set the active partition, but I can't find any way of seeing which partition is currently active.

Hopefully there's a simple answer and I'm just missing it …

Best Answer

Only way I know how to do this is close to what @Maximus put but do the following:

diskpart.exe
select volume 1
detail partition

The output will indicate

Active: Yes/No

For example: enter image description here

You have to go through each volume to find which ones are Active and which ones are not. You can use Diskpart's list volume command to show all volumes and find the one you want to check first.

Related Question