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 |
|---|---|
|
The method was successful. |
|
The NewExternalKey parameter is not an array of size 32. |
|
The volume is locked. |
|
BitLocker is not enabled on the volume. Add a key protector to enable BitLocker. |
|
A bootable CD/DVD is found in this computer. Remove the CD/DVD and restart the computer. |
|
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
This method can be used to change the external key for any key protector that uses an external key.
Requirements
|
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
Send comments about this topic to Microsoft
Build date: 10/26/2012