0

I just want to get internal Devices, which are with Bitlocker encrypted. But when I connect USB or external Hard drive, will be also read. actually, it should work just for internal devices. how could I filter ?

Here, I used this Code to get the devices

Get-CimInstance -Namespace "root\CIMV2\Security\MicrosoftVolumeEncryption" -Classname Win32_EncryptableVolume

boxdog
  • 7,894
  • 2
  • 18
  • 27
Alkahtani
  • 13
  • 3
  • 1
    Use the `DeviceID` property to correlate with `Win32_Volume` which can tell you if it's a local disk or a removable device (check `DeviceType` property) – Mathias R. Jessen Apr 21 '21 at 10:36
  • 1
    You can filter on the `VolumeType` property, which has values of: `[0,1,2] => ['OSVolume', 'FixedDataVolume', 'PortableDataVolume']`. I ran a quick test with an encrypted USB and it seemed to identify it correctly as 'PortableDataVolume'. – boxdog Apr 21 '21 at 10:41

0 Answers0