GetKeyPackage method of the Win32_EncryptableVolume class
The GetKeyPackage method of the Win32_EncryptableVolume class exports information that may help salvage encrypted data when the drive is severely damaged and no data backup files exist.
The exported information consists of the volume's encryption key secured by a key protector of the type "Numerical Password" or "External Key". To make use of this package, you must also save the corresponding numerical password or external key.
Important
If you choose to export a key package, make certain to keep this information in a well-protected location. Do not carry this information with your computer. If this key package is lost or stolen, you will need to decrypt the volume and reencrypt it by using a new key.
In the event of a drive failure, the BitLocker Repair Tool exists to help salvage available data. For more information about how this tool can use the key package, see How to use the BitLocker Repair Tool to help recover data from an encrypted volume in Windows Vista.
Syntax
uint32 GetKeyPackage(
[in] string VolumeKeyProtectorID,
[out] uint8 KeyPackage[]
);
Parameters
-
VolumeKeyProtectorID [in]
-
Type: string
A unique string identifier used to manage an encrypted volume key protector. To export a key package, you must use a key protector of type "Numerical Password" or "External Key".
-
KeyPackage[] [out]
-
Type: uint8
A byte stream that contains the encryption key for a volume, secured by the specified key protector.
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 volume is locked. |
|
BitLocker is not enabled on the volume. Add a key protector to enable BitLocker. |
|
The provided key protector does not exist on the volume. |
|
The VolumeKeyProtectorID parameter does not refer to a key protector of the type "Numerical Password" or "External Key". Use either the ProtectKeyWithNumericalPassword or ProtectKeyWithExternalKey method to create a key protector of the appropriate type. |
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 Vista Enterprise, Windows Vista Ultimate [desktop apps only] |
Minimum supported server |
Windows Server 2008 [desktop apps only] |
Namespace |
Root\CIMV2\Security\MicrosoftVolumeEncryption |
MOF |
|
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for