IoanPopovici
11/1/2018 - 5:46 PM

HWI EXT Win32_EncryptableVolume_Ext

SCCM HWI Extension for BitLocker Status

//——————————————— // BitLocker Status //———————————————

//-- Set default Namespace and delete the Win32_EncryptableVolume_Ext if it already exists
#PRAGMA Namespace   ("\\\\.\\Root\\CIMv2")
#PRAGMA DeleteClass ("Win32_EncryptableVolume_Ext", NOFAIL)

//-- Create custom class
//-  Class Qualifiers
[
    Description ("The Win32_EncryptableVolume_Ext class contains information about the BitLocker status. You can use this information for BitLocker reporting."): ToInstance,
    UNION,
    ViewSources {
        "SELECT DeviceID, PersistentVolumeID, DriveLetter, ProtectionStatus, ConversionStatus, EncryptionMethod, VolumeType, IsVolumeInitializedForProtection FROM Win32_EncryptableVolume"
    },
    ViewSpaces {
        "\\\\.\\Root\\CIMV2\\Security\\MicrosoftVolumeEncryption"
    },
    Dynamic,
    Provider ("MS_VIEW_INSTANCE_PROVIDER")
]
//-  Class properties
Class Win32_EncryptableVolume_Ext : SMS_Class_Template
{
    [ PropertySources {"DeviceID"}, KEY ]
    String    DeviceID;
    [ PropertySources {"PersistentVolumeID"} ]
    String    PersistentVolumeID;
    [ PropertySources {"DriveLetter"} ]
    String    DriveLetter;
    [ PropertySources {"ProtectionStatus"} ]
    UInt32    ProtectionStatus;
    [ PropertySources {"ConversionStatus"} ]
    UInt32    ConversionStatus;
    [ PropertySources {"EncryptionMethod"} ]
    UInt32    EncryptionMethod;
    [ PropertySources {"VolumeType"} ]
    UInt32    VolumeType;
    [ PropertySources {"IsVolumeInitializedForProtection"} ]
    Boolean   IsVolumeInitializedForProtection;
};