Open
Description
The #1 example given
PS C:> $BLV = Get-BitLockerVolume -MountPoint "C:"
PS C:> Backup-BitLockerKeyProtector -MountPoint "C:" -KeyProtectorId $BLV.KeyProtector[1].KeyProtectorId
This specifies and arbitrary position in the array $BLV.KeyProtector. There is no guarantee a RecoveryKey will always be in the [1] index position of the array. A better way to ensure you always get a recovery key to backup to AD would be as follows
PS C:> $BLV = Get-BitLockerVolume -MountPoint "C:"
PS C:> $KP = $BLV.KeyProtector | Where-Object {$PSItem.KeyProtectorType -eq "RecoveryPassword"}
PS C:> Backup-BitLockerKeyProtector -MountPoint "C:" -KeyProtectorId $KP.KeyProtectorId
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 4366adb5-705b-8276-4051-714f3fd63bb9
- Version Independent ID: 4d7fa123-14e3-9c90-7c55-99f039a9e756
- Content: Backup-BitLockerKeyProtector (BitLocker)
- Content Source: docset/winserver2022-ps/bitlocker/Backup-BitLockerKeyProtector.md
- Product: w10
- Technology: windows
- GitHub Login: @JasonGerend
- Microsoft Alias: jgerend