---
updatedAt: 2025-08-14T13:35:41.000Z
agentTools:
  siteIndex: https://developer.n-able.com/llms.txt
  projectIndex: https://developer.n-able.com/n-central/llms.txt
---

# BitLockerStatus

```powershell PowerShell
$ParamPrimaryDrives =  "C:"

$OtherDriveOn="No Other Drives have Bitlocker On"
$OtherDriveOff="No Other Drives have Bitlocker Off"
$OtherDriveStatusCode=1 #1 = OK, 2 = Fail, 3 = warning (BitLockerNotSupported)

$PrimDriveOn="No System Drive has Bitlocker On"
$PrimDriveOff="No System Drive has Bitlocker Off"
$PrimDriveStatusCode=1 #1 = OK, 2 = Fail, 3 = warning (BitLockerNotSupported)

$BitlockerStatus=2 #1 = OK, 2 = Fail, 3 = warning (BitLockerNotSupported)
$PrimaryDriveList=$ParamPrimaryDrives


if (Get-Command "Get-BitLockerVolume" -errorAction SilentlyContinue)
{

    #IF ENABLED, SET BITLOCKERFEATURESTATUS TO OK
    $BitLockerFeature="Turned On"
    $BitlockerStatus=1

    #GET BITLOCKER STATUS
    $Bitlocklist = Get-BitLockerVolume 

    #GET PROTECTION STATUS
    $SysDrvProtectionStatus = Get-BitLockerVolume -MountPoint "$ParamPrimaryDrives"
    $ProtectionStatus = $SysDrvProtectionStatus.ProtectionStatus

    #GO THROUGH DRIVES
    foreach($bitlockinfo in $Bitlocklist)
    {
        #IF IT IS THE PRIMARY DRIVE (C), TAKE THE INFO
        if($bitlockinfo.MountPoint -in $PrimaryDriveList)
        {
            if($bitlockinfo.VolumeStatus -ne "FullyEncrypted")
            {
                $PrimDriveStatusCode=2
                if($PrimDriveOff -eq "No System Drive has Bitlocker Off")
                {
                    $PrimDriveOff=$bitlockinfo.MountPoint + " is " + $bitlockinfo.VolumeStatus

                }
                else
                {
                    $PrimDriveOff=$PrimDriveOff +", " + $bitlockinfo.MountPoint + " is " + $bitlockinfo.VolumeStatus

                }
            }
            else
            {
                if($PrimDriveOn -eq "No System Drive has Bitlocker On")
                {
                    $PrimDriveOn=$bitlockinfo.MountPoint + " is " + $bitlockinfo.VolumeStatus

                }
                else
                {
                    $PrimDriveOn=$PrimDriveOn +", " + $bitlockinfo.MountPoint + " is " + $bitlockinfo.VolumeStatus

                }
            }
        }
        #IF IT IS NOT (C), CAPTURE INTO IN A GROUP. THIS IS SECONDARY PARTITIONS, EXTERNAL DRIVES, ETC
        else 
        {
            if($bitlockinfo.VolumeStatus -ne "FullyEncrypted")
            {
                $OtherDriveStatusCode=2
                if($OtherDriveOff -eq "No Other Drives have Bitlocker Off")
                {
                    $OtherDriveOff=$bitlockinfo.MountPoint + " is " + $bitlockinfo.VolumeStatus

                }
                else
                {
                    $OtherDriveOff=$OtherDriveOff +", " + $bitlockinfo.MountPoint + " is " + $bitlockinfo.VolumeStatus

                }
            }
            else
            {
                if($OtherDriveOn -eq "No Other Drives have Bitlocker On")
                {
                    $OtherDriveOn=$bitlockinfo.MountPoint + " is " + $bitlockinfo.VolumeStatus

                }
                else
                {
                    $OtherDriveOn=$OtherDriveOn +", " + $bitlockinfo.MountPoint + " is " + $bitlockinfo.VolumeStatus

                }
            }
        
        }

    }

}
else
{
    #"BITLOCKER NOT TURNED ON"
    $WinVer = (Get-WmiObject -class Win32_OperatingSystem).Caption
    if($WinVer -like "*home*")
    {
        $BitlockerStatus=2
        $BitLockerFeature = $WinVer + " does not support Bitlocker"

        $OtherDriveOn="Bitlocker not enabled, no information returned"
        $OtherDriveOff="Bitlocker not enabled, no information returned"
        $OtherDriveStatusCode=2 #1 = OK, 2 = Fail, 3 = warning (BitLockerNotSupported)

        $PrimDriveOn="Bitlocker not enabled, no information returned"
        $PrimDriveOff="Bitlocker not enabled, no information returned"
        $PrimDriveStatusCode=2 #1 = OK, 2 = Fail, 3 = warning (BitLockerNotSupported)    
    }
    else
    {
        $BitlockerStatus=3
        $BitLockerFeature = $WinVer + "Supports BitLocker but the feature is not installed"

        $OtherDriveOn="Bitlocker not enabled, no information returned"
        $OtherDriveOff="Bitlocker not enabled, no information returned"
        $OtherDriveStatusCode=3 

        $PrimDriveOn="Bitlocker not enabled, no information returned"
        $PrimDriveOff="Bitlocker not enabled, no information returned"
        $PrimDriveStatusCode=3 
    }
}

"BitlockerFeatureStatusCode : " + $BitlockerStatus
"BitlockerFeatureDetails : " + $BitLockerFeature

"Selected Drive With BitLocker On : " + $PrimDriveOn
"Selected Drive With BitLocker Off: " + $PrimDriveOff
"Selected Drive Status Code : " + $PrimDriveStatusCode

"Other Drive With BitLocker On : " + $OtherDriveOn
"Other Drive With BitLocker Off: " + $OtherDriveOff
"Other Drive Status Code : " + $OtherDriveStatusCode

```

```json Response Example
{"success":true}
```

# SCRIPT