# Get the BitLocker encryption status for all volumes
$bitlockerVolumes = Get-BitLockerVolume
# Check if any BitLocker volumes are found
if ($bitlockerVolumes) {
Write-Output "BitLocker Encryption Status Report:"
Write-Output "-------------------------------------"
foreach ($volume in $bitlockerVolumes) {
Write-Output "Volume: $($volume.MountPoint)"
Write-Output " Encryption Status: $($volume.ProtectionStatus)"
Write-Output " Encryption Percentage: $($volume.EncryptionPercentage)%"
Write-Output " Key Protectors: $($volume.KeyProtector | ForEach-Object { $_.KeyProtectorType })"
Write-Output "-------------------------------------"
}
} else {
Write-Output "No BitLocker volumes found."
}
Explanation of the Script Steps
1. Retrieve BitLocker Volumes: The script uses the Get-BitLockerVolume cmdlet to get the status of all volumes with BitLocker enabled.
2. Check for Volumes: If no BitLocker volumes are found, a message is displayed. Otherwise, it proceeds to display the status.
3. Display Information: For each volume, it outputs:
• Volume: The drive letter or mount point.
• Encryption Status: Whether BitLocker is on or off (protected or not).
• Encryption Percentage: The progress of the encryption process (0% to 100%).
• Key Protectors: The types of key protectors used for that volume (e.g., TPM, password, recovery key).
Running the Script
1. Open PowerShell as an administrator.
2. Copy and paste the above script into the PowerShell window.
3. Press Enter to run the script.
Output Example
The output will look something like this:
BitLocker Encryption Status Report:
-------------------------------------
Volume: C:
Encryption Status: On
Encryption Percentage: 100%
Key Protectors: TPM, RecoveryPassword
-------------------------------------
Volume: D:
Encryption Status: Off
Encryption Percentage: 0%
Key Protectors:
-------------------------------------
Last updated