SaveExternalKeyToFile method of the Win32_EncryptableVolume class
The SaveExternalKeyToFile method of the Win32_EncryptableVolume class writes the external key associated with the specified volume key protector to a system, hidden, read-only file in the specified folder.
This method is only applicable for key protectors of the type "External Key" or "TPM And Startup Key".
Syntax
uint32 SaveExternalKeyToFile(
[in] string VolumeKeyProtectorID,
[in] string Path
);
Parameters
-
VolumeKeyProtectorID [in]
-
Type: string
A unique string identifier used to manage an encrypted volume key protector.
-
Path [in]
-
Type: string
A string that contains the volume or folder location where the external key associated with the specified key protector is to be saved. This path does not include the name of the file, which is internal and may change from version to version. Use GetExternalKeyFileName to get the file name.
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. |
|
The VolumeKeyProtectorID parameter does not refer to a key protector of the type "External Key" or "TPM And Startup Key". |
|
The Path parameter does not refer to a valid location. Ensure that the file name is not included in the Path parameter. |
|
BitLocker is not enabled on the volume. Add a key protector to enable BitLocker. |
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