Skip to content

Commit d15b288

Browse files
authored
Update BackupToAAD-BitLockerKeyProtector.md
Assuming that the RecoveryPassword protector type is always at index 1 in the array can lead to inconsistent results—I experienced this just yesterday. It's better to explicitly select the correct protector type rather than relying on it always being at index 1. On one system I worked on, it was actually at index 0, which is why I'm making this suggestion.
1 parent cbe411d commit d15b288

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: docset/winserver2025-ps/bitlocker/BackupToAAD-BitLockerKeyProtector.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The **BackupToAAD-BitLockerKeyProtector** cmdlet saves a recovery password key p
2424
### Example 1
2525
```powershell
2626
PS C:\> $BLV = Get-BitLockerVolume -MountPoint "C:"
27-
PS C:\> BackupToAAD-BitLockerKeyProtector -MountPoint "C:" -KeyProtectorId $BLV.KeyProtector[1].KeyProtectorId
27+
PS C:\> BackupToAAD-BitLockerKeyProtector -MountPoint "C:" -KeyProtectorId ($BLV.KeyProtector | Where-Object {$_.KeyProtectorType -eq "RecoveryPassword" }).KeyProtectorId
2828
2929
```
3030

0 commit comments

Comments
 (0)