GetKeyProtectorCertificate method of the Win32_EncryptableVolume class

The GetKeyProtectorCertificate method of the Win32_EncryptableVolume class retrieves the public key and certificate thumbprint for a public key protector.

Syntax

uint32 GetKeyProtectorCertificate(
  [in]  string VolumeKeyProtectorID,
  [out] uint8  PublicKey[],
  [out] string CertThumbprint,
  [out] uint32 CertType
);

Parameters

VolumeKeyProtectorID [in]

Type: string

A unique string identifier used to manage an encrypted volume key protector.

PublicKey [out]

Type: uint8[]

An array of bytes that specifies the public key.

CertThumbprint [out]

Type: string

A string that specifies the certificate thumbprint.

CertType [out]

Type: uint32

An unsigned integer that specifies the type of the key protector. This integer is used to differentiate between data recovery agent (DRA) and user certificates.

Value Meaning
1
The certificate is a DRA.
2
The certificate is not a DRA.

 

Return value

Type: uint32

This method returns one of the following codes or another error code if it fails.

Return code/value Description
S_OK
0 (0x0)
The method was successful.
E_INVALIDARG
2147942487 (0x80070057)
The specified key protector is not a key protector. You must enter another key protector.
FVE_E_LOCKED_VOLUME
2150694912 (0x80310000)
This drive is locked by BitLocker Drive Encryption. You must unlock this volume from Control Panel.
FVE_E_NOT_ACTIVATED
2150694920 (0x80310008)
BitLocker is not enabled on the volume. Add a key protector to enable BitLocker.
FVE_E_POLICY_USER_CERTIFICATE_REQUIRED
2150695027 (0x80310073)
Group Policy requires the use of a user certificate, such as a smart card.

 

Remarks

Managed Object Format (MOF) files contain the definitions for Windows Management Instrumentation (WMI) classes. MOF files are not installed as part of the Windows SDK. They are installed on the server when you add the associated role by using the Server Manager. For more information about MOF files, see Managed Object Format (MOF).

Requirements

Requirement Value
Minimum supported client
Windows 7 Enterprise, Windows 7 Ultimate [desktop apps only]
Minimum supported server
Windows Server 2008 R2 [desktop apps only]
Namespace
Root\CIMV2\Security\MicrosoftVolumeEncryption
MOF
Win32_encryptablevolume.mof

See also

Win32_EncryptableVolume