Skip to main content

Get-BitLockerState

Description

This script checks and reports the BitLocker encryption status of drives on a Windows system.

Requirements

  • PowerShell v5 or higher
  • Administrative privileges are required for correct execution

Overview

The Get-BitLockerState.ps1 script provides detailed information about the BitLocker encryption status of each drive on a system. It checks various aspects of BitLocker configuration, such as protection status, volume status, encryption percentage, and conversion status. The script outputs its findings to designated log files and can be configured to run specific checks based on the parameters passed.

Usage

To execute the script with all checks:

.\Get-BitLockerState.ps1

To execute the script with specific checks, use the corresponding switch parameters:

## To check only the state of BitLocker protection
.\Get-BitLockerState.ps1 -CheckState

## To check only the volume status of BitLocker
.\Get-BitLockerState.ps1 -CheckVolumeStatus

## To check only the encryption percentage of the drive
.\Get-BitLockerState.ps1 -CheckEncryptionPercentage

## To check only the conversion status of BitLocker on the drive
.\Get-BitLockerState.ps1 -CheckConversionStatus

Parameters

ParameterRequiredDefaultTypeDescription
-CheckStateFalseSwitchCheck the state of BitLocker protection.
-CheckVolumeStatusFalseSwitchCheck the volume status of BitLocker.
-CheckEncryptionPercentageFalseSwitchCheck the encryption percentage of the drive.
-CheckConversionStatusFalseSwitchCheck the conversion status of BitLocker on the drive.

Output

The script generates the following output files in the same directory where it is executed:

  • Get-BitLockerState-log.txt - Log file with detailed execution logs
  • Get-BitLockerState-data.txt - File containing data points gathered during execution
  • Get-BitLockerState-error.txt - Error log file capturing any issues encountered during script execution

Notes

  • The script is designed to be run on systems with BitLocker enabled.
  • Administrative rights are required to access BitLocker status information.
  • The script does not modify any system settings or BitLocker configurations.