So, for whatever reason your systemās WMI doesnāt seem to be returning the same properties as @alinder or @brolly33. One way to see all of the properties that your system does return is via
q: properties of select objects "* from win32_EncryptableVolume" of WMIs "root\CIMv2\Security\MicrosoftVolumeEncryption"
A: __PATH=\\JASON-LAPTOP\root\CIMv2\Security\MicrosoftVolumeEncryption:Win32_EncryptableVolume.DeviceID="\\\\?\\Volume{21bbf6e2-dcd3-4b79-a6d9-7c4e32b07152}\\"
A: __NAMESPACE=root\CIMv2\Security\MicrosoftVolumeEncryption
A: __SERVER=JASON-LAPTOP
A: __DERIVATION
A: __PROPERTY_COUNT=8
A: __RELPATH=Win32_EncryptableVolume.DeviceID="\\\\?\\Volume{21bbf6e2-dcd3-4b79-a6d9-7c4e32b07152}\\"
A: __DYNASTY=Win32_EncryptableVolume
A: __SUPERCLASS
A: __CLASS=Win32_EncryptableVolume
A: __GENUS=2
A: ConversionStatus=1
A: DeviceID=\\?\Volume{21bbf6e2-dcd3-4b79-a6d9-7c4e32b07152}\
A: DriveLetter=D:
A: EncryptionMethod=6
A: IsVolumeInitializedForProtection=True
A: PersistentVolumeID={13C7219B-85F1-4889-9BBA-079A0E38DFCE}
A: ProtectionStatus=1
A: VolumeType=1
A: __PATH=\\JASON-LAPTOP\root\CIMv2\Security\MicrosoftVolumeEncryption:Win32_EncryptableVolume.DeviceID="\\\\?\\Volume{c4a1ea59-4fd2-4a8f-aa09-fd1749349bd6}\\"
A: __NAMESPACE=root\CIMv2\Security\MicrosoftVolumeEncryption
A: __SERVER=JASON-LAPTOP
A: __DERIVATION
A: __PROPERTY_COUNT=8
A: __RELPATH=Win32_EncryptableVolume.DeviceID="\\\\?\\Volume{c4a1ea59-4fd2-4a8f-aa09-fd1749349bd6}\\"
A: __DYNASTY=Win32_EncryptableVolume
A: __SUPERCLASS
A: __CLASS=Win32_EncryptableVolume
A: __GENUS=2
A: ConversionStatus=1
A: DeviceID=\\?\Volume{c4a1ea59-4fd2-4a8f-aa09-fd1749349bd6}\
A: DriveLetter=C:
A: EncryptionMethod=6
A: IsVolumeInitializedForProtection=True
A: PersistentVolumeID={8F28FEE2-12E8-454A-9831-C6C28961B15D}
A: ProtectionStatus=1
A: VolumeType=0
T: 13.327 ms
I: plural wmi select
My system also returns all of the properties that are being checked. I think youāll need to select *
, then iterate through the properties using the pipe operator ā|ā for error-handling as before. In my query below, I added another āDummyā property at the end, specifically to check that Iām properly handling the case of a property that doesnāt exist / isnāt returnedā¦the key here is that if I used select objects "A,B,C from win32_EncryptableVolume"
Iād have an empty result if A,B, or C didnāt exist; instead I use select objects "* ..."
to get everything.
q: (property "DeviceID" of it as string | "Device ID Unavailable", property "ProtectionStatus" of it as string | "Protection Status Unavailable", property "VolumeType" of it as string | "Volume Type Unavailable", property "IsVolumeInitializedForProtection" of it as string | "Is Volume Initialized For Protection Unavailable", property "EncryptionMethod" of it as string | "Encryption Method Unavailable", property "Dummy" of it as string | "Dummy Unavailable") of select objects "* from win32_EncryptableVolume" of WMIs "root\CIMv2\Security\MicrosoftVolumeEncryption"
A: DeviceID=\\?\Volume{21bbf6e2-dcd3-4b79-a6d9-7c4e32b07152}\, ProtectionStatus=1, VolumeType=1, IsVolumeInitializedForProtection=True, EncryptionMethod=6, Dummy Unavailable
A: DeviceID=\\?\Volume{c4a1ea59-4fd2-4a8f-aa09-fd1749349bd6}\, ProtectionStatus=1, VolumeType=0, IsVolumeInitializedForProtection=True, EncryptionMethod=6, Dummy Unavailable
T: 14.035 ms
I: plural ( string, string, string, string, string, string )
Hereās the same query, from the āSingle Clauseā tab, thatās formatted to make it just a bit more readable
(
property "DeviceID" of it as string | "Device ID Unavailable",
property "ProtectionStatus" of it as string | "Protection Status Unavailable",
property "VolumeType" of it as string | "Volume Type Unavailable",
property "IsVolumeInitializedForProtection" of it as string | "Is Volume Initialized For Protection Unavailable",
property "EncryptionMethod" of it as string | "Encryption Method Unavailable",
property "Dummy" of it as string | "Dummy Unavailable"
) of
select objects "* from win32_EncryptableVolume" of
WMIs "root\CIMv2\Security\MicrosoftVolumeEncryption"