1

I have a USB hard drive encrypted with BitLocker:

enter image description here


While it's yet unlocked, in PowerShell I want to retrieve the drive's volume label, so I run a command like this:

Get-WmiObject -Class Win32_Volume |Where-Object {$_.DeviceID -like "\\?\Volume{a54e95ae-3dae-11e4-9cbc-001e673f1fc5}\"} | Select-Object DriveLetter,DeviceID,Label,Name,Caption | FL

But the output doesn't include the volume label:

DriveLetter : I:
DeviceID    : \\?\Volume{a54e95ae-3dae-11e4-9cbc-001e673f1fc5}\
Label       :
Name        : I:\
Caption     : I:\

How can I retrieve the drive's label before unlocking the drive?


Use scenario

The reason I want to obtain the drive's label is so that my PowerShell script can enumerate all of the drives connected to the system, then based on the drive's label unlock the disk using the correct BitLocker recovery key file. Normally I do this using the drive's DeviceID, but in this case I have multiple USB drives that are reporting the same DeviceID...which might end up being another SU question.

1 Answers1

1

The volume label is encrypted too because it resides on the volume itself, so your only option would be using the volume GUID.

Duplicate GUIDs are statistically very rare (See this thread on the subject), but you're saying your have several USB drives with the same GUID...

I'd suggest you to use Diskpart and reinitialize the drives, thus creating a new GUID for each, as follows:

Diskpart
List Volume
Select Volume <relevant drive letter>
Clean

That would wipe the MBR of the drive, so be careful.

EliadTech
  • 2,184