Reading a bitlocker encrypted disk label.
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 ?
March 29th, 2011 9:43am

For source code related question, please discuss in our MSDN forum. Security for Applications in Microsoft Windows http://social.msdn.microsoft.com/Forums/en/windowssecurity/threadsPlease remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
March 31st, 2011 5:25am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics