Edit

Share via


Unprotect-ShieldedVMRecoveryKey

Decrypts an encrypted recovery key for a Windows shielded VM obtained from the Save-ShieldedVMRecoveryKey cmdlet.

Syntax

EBEKFileParameterSet (Default)

Unprotect-ShieldedVMRecoveryKey
    -ShieldingDataFilePath <String>
    -EncryptedBitLockerKeyPath <String>
    -DecryptedBitLockerKeyPath <String>
    [-WhatIf]
    [-Confirm]

EBEKFileSearchParameterSet

Unprotect-ShieldedVMRecoveryKey
    -ShieldingDataFileSearchPath <String[]>
    -EncryptedBitLockerKeyPath <String>
    -DecryptedBitLockerKeyPath <String>
    [-Recurse]
    [-WhatIf]
    [-Confirm]

Description

The Unprotect-ShieldedVMRecoveryKey cmdlet decrypts an encrypted BitLocker recovery key file obtained from a Windows shielded VM. To run the cmdlet, you must have the shielding data file that was used to deploy the shielded VM and have the private key for the owner guardian installed on your computer.

The resulting recovery key can be provided to manage-bde.exe, Unlock-BitLocker, or the BitLocker Recovery pre-boot environment to access the contents of your shielded VM OS volume.

Examples

Example 1

PS C:\> Unprotect-ShieldedVMRecoveryKey -ShieldingDataFilePath 'C:\temp\ShieldingDataFile.pdk' -EncryptedBitLockerKeyPath 'C:\temp\MyShieldedVMEncryptedRecoveryKey.ebek' -DecryptedBitLockerKeyPath 'C:\temp\DecryptedRecoveryKey.bek'

Decrypts the provided encrypted BitLocker recovery key using the shielding data file and owner guardian private keys, and saves it to the temp directory.

Example 2

PS C:\> Unprotect-ShieldedVMRecoveryKey -ShieldingDataSearchPath 'C:\temp\AllShieldingDataFiles\' -Recurse -EncryptedBitLockerKeyPath 'C:\temp\MyShieldedVMEncryptedRecoveryKey.ebek' -DecryptedBitLockerKeyPath 'C:\temp\DecryptedRecoveryKey.bek'

Searches the 'AllShieldingDataFiles' directory and all subdirectories for shielding data files that can be used to decrypt the provided encrypted BitLocker recovery key. If a suitable shielding data file is found and the private key for its owner guardian is available on the local computer, the decrypted BitLocker encryption key will be saved to the temp directory.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DecryptedBitLockerKeyPath

Location to save the decrypted BitLocker encryption key (.bek)

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EncryptedBitLockerKeyPath

Location of the encrypted BitLocker encryption key

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Recurse

Specifies the cmdlet should search subdirectories of the shielding data file search path for compatible PDK files.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

EBEKFileSearchParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ShieldingDataFilePath

Location of the shielding data file (.pdk) used to deploy the shielded VM.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

EBEKFileParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ShieldingDataFileSearchPath

Location of one or more directories to search for a shielding data file that can be used to decrypt the provided encrypted BitLocker encryption key.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

EBEKFileSearchParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

Inputs

None

Outputs

None