Rediger

Del via


GetHardwareTestStatus method of the Win32_EncryptableVolume class

The GetHardwareTestStatus method of the Win32_EncryptableVolume class provides status information about a hardware test of a fully decrypted operating system volume.

Use this method to show whether a hardware test is pending, as well as the success or failure of a hardware test that completed on the last computer restart. To request a hardware test, use the EncryptAfterHardwareTest method.

Syntax

uint32 GetHardwareTestStatus(
  [out] uint32 TestStatus,
  [out] uint32 TestError
);

Parameters

TestStatus [out]

Type: uint32

Specifies whether a hardware test is pending, as well as the success of failure of a hardware test that completed on the last computer restart.

Value Meaning
NotFailed_and_NonePending
0
If a test was requested, the test has succeeded on the last computer restart and volume encryption is now in progress. For the encryption status, see the GetConversionStatus method. Otherwise, no test ran on the last computer restart and none is pending.
Failed
1
Volume encryption did not start. All key protectors were removed.
To resolve a failed test:
  • Consult the information in the TestError parameter.
  • Add key protectors and use the EncryptAfterHardwareTest method again.
Pending
2
A test has been requested and will run on the next computer restart.

 

TestError [out]

Type: uint32

Specifies the error from the last completed hardware test.

Value Meaning
0
No errors occurred or no hardware test ran on the last computer restart.
2150694972 (0x8031003C)
FVE_E_KEYFILE_NOT_FOUND
A USB flash drive with an external key file was not found. If this failure persists, the computer cannot read USB drives during restart. You may not be able to use external keys to unlock the operating system volume during restart.
2150694973 (0x8031003D)
FVE_E_KEYFILE_INVALID
The external key file on the USB flash drive was corrupt. Try a different USB flash drive to store the external key file.
2150694975 (0x8031003F)
FVE_E_TPM_DISABLED
The TPM is either disabled or deactivated or both disabled and deactivated. To turn on the TPM, use the Win32_Tpm WMI provider or run the TPM management snap-in (Tpm.msc).
2150694977 (0x80310041)
FVE_E_TPM_INVALID_PCR
The TPM detected a change in operating system restart services within the current platform validation profile. Remove any startup CD or DVD from the computer. If this failure persists, check that the latest firmware and BIOS upgrades are installed, and that the TPM is otherwise working properly.
2150694979 (0x80310043)
FVE_E_PIN_INVALID
The provided PIN was incorrect.

 

Return value

Type: uint32

The following table lists some of the common return codes.

Return code/value Description
S_OK
0 (0x0)
The method succeeded.
FVE_E_LOCKED_VOLUME
2150694912 (0x80310000)
The volume is locked.

 

Remarks

To request a hardware test, use the EncryptAfterHardwareTest method.

To run a hardware test when its status is pending, follow these steps:

  1. Insert into the computer a USB flash drive that contains an external key file. This step applies only if the volume has a key protector of type "External Key" or "TPM And Startup Key".
  2. Restart the computer. On computer restart, the hardware test runs automatically.

To cancel the hardware test, use the Encrypt method.

A successful test determines that:

  • The TPM can unlock the volume if a TPM-related key protector exists.
  • The computer can read a USB flash drive that contains an external key file during startup if the volume can be unlocked by an external key (including a startup key).

Hardware test results will not be available after any changes in conversion or after the next computer restart. Check the System event log for the information about any hardware tests that previously ran on the computer.

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
Win32_encryptablevolume.mof

See also

Win32_EncryptableVolume