Skip to content

Improper Example #2996

Open
Open
@gummby8

Description

@gummby8

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.

Metadata

Metadata

Assignees

Labels

area-bitlockerIssues for bitlocker moduledoc-enhancementSuggested additions/improvements to the article, but there is no evidence the customer was blocked.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions