DeleteKeyProtector method of the Win32_EncryptableVolume class
The DeleteKeyProtector method of the Win32_EncryptableVolume class deletes a given key protector for the volume.
If an unencrypted volume has key protectors, when DeleteKeyProtector removes the last key protector, the volume reverts to a standard NTFS file system.
If a volume has never been encrypted, deleting the key protector will revert to NTFS.
If the volume is not yet fully decrypted, use DisableKeyProtectors before removing the volume's last key protector to ensure that encrypted portions of the volume remain accessible.
Syntax
uint32 DeleteKeyProtector(
[in] string VolumeKeyProtectorID
);
Parameters
-
VolumeKeyProtectorID [in]
-
Type: string
A unique string identifier 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 volume is locked. |
|
BitLocker is not enabled on the volume. Add a key protector to enable BitLocker. |
|
The VolumeKeyProtectorID parameter does not refer to a valid key protector. |
|
The last key protector for a partially or fully encrypted volume cannot be removed if key protectors are enabled. Use DisableKeyProtectors before removing this last key protector to ensure that encrypted portions of the volume remain accessible. |
|
This key protector cannot be deleted because it is being used to automatically unlock the volume. Use DisableAutoUnlock to disable automatic unlocking before deleting this key protector. |
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