UnlockWithCertificateFile method of the Win32_EncryptableVolume class
The UnlockWithCertificateFile method of the Win32_EncryptableVolume class uses the provided certificate file to obtain the derived key and unlock the encrypted volume.
Note
If the disc supports hardware encryption this function sets the band status to "unlocked""
Syntax
uint32 UnlockWithCertificateFile(
[in] string FileName,
[in] string PIN
);
Parameters
-
FileName [in]
-
Type: string
A string that specifies the location and name of the .cer file used to retrieve the certificate thumbprint. An encryption certificate must be exported in .cer format (Distinguished Encoding Rules (DER)-encoded binary X.509 or Base-64 encoded X.509). The encryption certificate may be generated from Microsoft PKI, third-party PKI, or self-signed.
-
PIN [in]
-
Type: string
A user-specified personal identification string. This string must consist of a sequence of 4 to 20 digits. This string is used to silently authenticate the key storage provider (KSP) when used with a smart card.
Return value
Type: uint32
This method returns one of the following codes or another error code if it fails.
Return code/value | Description |
---|---|
|
The method was successful. |
|
The system cannot file the specified file. |
|
BitLocker is not enabled on the volume. Add a key protector to enable BitLocker. |
|
The volume cannot be unlocked with the provided information. |
|
The provided key protector does not exist on the volume. You must enter another key protector. |
|
The private key, associated with the specified certificate, could not be authorized. The private key authorization was either not provided or the provided authorization was invalid. |
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 |
|
See also