ChangeExternalKey method of the Win32_EncryptableVolume class

The ChangeExternalKey method of the Win32_EncryptableVolume class changes an external key that is associated with an encrypted volume.

Syntax

uint32 ChangeExternalKey(
  [in]           string VolumeKeyProtectorID,
  [in, optional] uint8   NewExternalKey[],
  [out]          string NewVolumeKeyProtectorID
);

Parameters

VolumeKeyProtectorID [in]

Type: string

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

NewExternalKey [in, optional]

Type: uint8[]

An array of bytes that specifies the 256-bit external key used to unlock the volume.

NewVolumeKeyProtectorID [out]

Type: string

An updated unique string identifier that is used to manage an encrypted volume 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
S_OK
0 (0x0)
The method was successful.
E_INVALIDARG
2147942487 (0x80070057)
The NewExternalKey parameter is not an array of size 32.
FVE_E_LOCKED_VOLUME
2150694912 (0x80310000)
The volume is locked.
FVE_E_NOT_ACTIVATED
2150694920 (0x80310008)
BitLocker is not enabled on the volume. Add a key protector to enable BitLocker.
FVE_E_BOOTABLE_CDDVD
2150694960 (0x80310030)
A bootable CD/DVD is found in this computer. Remove the CD/DVD and restart the computer.
FVE_E_PROTECTOR_NOT_FOUND
2150694963 (0x80310033)
The provided key protector does not exist on the volume.
FVE_E_INVALID_PROTECTOR_TYPE
2150694970 (0x8031003A)
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

This method can be used to change the external key for any key protector that uses an external key.

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