none
Reading a bitlocker encrypted disk label. RRS feed

  • Question

  • Hi,

    I am trying to read the disk label of an bitlocker encrypted disk using wmi, but the disk is not accessible as it is encrypted. (Not the bitlocker partition, the encrypted partition itself)

    As Bitlocker is displaying the label name on the recovery screen I really would not see any kind of security issue related to this : this information is acessible anyhow.

     

    Here is what I tried :

    strcomputer = "."

    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    Set colVolumes = objWMIService.ExecQuery("Select * from Win32_Volume")
    For Each objVolume In colVolumes  
        If objVolume.Label = "Bitlocker" then
          msgbox "Bitlocker volume "& objVolume.DriveLetter& " => " & objVolume.Label
        Else
          msgbox "Disk " & objVolume.DriveLetter& " => " & objVolume.Label
        End If
      End If
    Next

     

    This will not even list the encrypted disk.

     

    Then I tried this :

    strcomputer = "."

    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2\Security\MicrosoftVolumeEncryption")
    Set colItems = objWMIService.ExecQuery( "SELECT * FROM Win32_EncryptableVolume",,48)
    For Each objItem in colItems
      msgbox "DeviceID: " & objItem.DeviceID & " DriveLetter: " & objItem.DriveLetter & " EncryptionMethod: " & objItem.GetEncryptionMethod & " Persistent ID : " & objItem.PersistentVolumeID  & " ID Field : " & objItem.GetIdentificationField
    Next

     

    Which lists a lot of properties but not the label. I could not find a property/function that could show the label. Any idea ?

     

     

    Tuesday, March 29, 2011 1:36 PM

Answers