GetKeyProtectorNumericalPassword method of the Win32_EncryptableVolume class

The GetKeyProtectorNumericalPassword method of the Win32_EncryptableVolume class retrieves the numerical password for a given key protector of the appropriate type.

The key protector identifier must refer to a key protector of type "Numerical Password".


uint32 GetKeyProtectorNumericalPassword(
  [in]  string VolumeKeyProtectorID,
  [out] string NumericalPassword


VolumeKeyProtectorID [in]

Type: string

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

NumericalPassword [out]

Type: string

A string that represents the password that can be used to unlock the corresponding volume.

The numerical password is 48 digits. These digits are divided into 8 groups of 6 digits, with the last digit in each group indicating a checksum value for the group. Assuming that a group of six digits is labeled as x1, x2, x3, x4, x5, and x6, the checksum x6 digit is calculated as –x1+x2–x3+x4–x5 mod 11.

The groups of digits are separated by a hyphen. Therefore, "xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxx" is the format of the returned password.

Return value

Type: uint32

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

Return code/valueDescription
0 (0x0)

The method was successful.

2150694912 (0x80310000)

The volume is locked.

2147942487 (0x80070057)

The VolumeKeyProtectorID parameter does not refer to a key protector of the type "Numerical Password".

2150694920 (0x80310008)

BitLocker is not enabled on the volume. Add a key protector to enable BitLocker.



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).


Minimum supported client

Windows Vista Enterprise, Windows Vista Ultimate [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]





See also