Backup Bitlocker Keys Script

Backup Bitlocker Keys Script

Enable PSRemoting

psexec \\Computername -s powershell Enable-PSRemoting -Force

 

Then Backup key to Active Directory

$s = New-PSSession Computername
Invoke-Command -Session $s -Scriptblock {$keyID = Get-BitLockerVolume -MountPoint c: | select -ExpandProperty keyprotector | where {$_.KeyProtectorType -eq 'RecoveryPassword'}}
Invoke-Command -Session $s -Scriptblock {Backup-BitLockerKeyProtector -MountPoint c: -KeyProtectorId $keyID.KeyProtectorId}
Remove-PSsession $s

Leave a Reply

Your email address will not be published. Required fields are marked *