Have a Question?
Categories
Print

PowerShell – BitLocker RecoveryKey

Script pour récupérer la clé BitLocker sur un post: $RecoveryKey

$BitlockerVolumers = Get-BitLockerVolume
    # For each volume, get the RecoveryPassowrd and display it.
    $BitlockerVolumers | ForEach-Object {
            $MountPoint = $_.MountPoint 
            $RecoveryKey = [string]($_.KeyProtector).RecoveryPassword       
            if ($RecoveryKey.Length -gt 5) {
                If ($MountPoint -eq "C:") {
                    Write-host ("$RecoveryKey")
                }
            }        
        }