SCCM SQL queries

Check BitLocker protection status for each computer

SQL query for the Configuration Manager database that shows if BitLocker protection is on or off for the drives of each computer.

LanguageSQL
What it does to the systemReads only. It changes nothing.

An unprotected laptop is a data risk if it is lost. This query shows which drives have BitLocker protection turned on.

The result shows each computer and drive letter with a protection state of On, Off or Unknown. Unprotected drives are at the top.

SQL
-- Type the drive to check. Use '%' to check every drive.
DECLARE @Drive NVARCHAR(10) = 'C:';

SELECT
    rs.Name0            AS ComputerName,
    ev.DriveLetter0     AS Drive,
    CASE ev.ProtectionStatus0
        WHEN 0 THEN 'Off'
        WHEN 1 THEN 'On'
        WHEN 2 THEN 'Unknown'
    END                 AS Protection
FROM v_R_System rs
JOIN v_GS_ENCRYPTABLE_VOLUME ev
    ON ev.ResourceID = rs.ResourceID
WHERE ev.DriveLetter0 LIKE @Drive
ORDER BY ev.ProtectionStatus0, rs.Name0, ev.DriveLetter0;

How to use it

  1. Open SQL Server Management Studio and connect to the site database.
  2. Paste the query into a new query window.
  3. Run the query to check the C: drive of every computer.
  4. Change @Drive to '%' to check every drive.
  5. To see only unprotected drives, add the line AND ev.ProtectionStatus0 <> 1 to the WHERE block.

Good to know

  • This view depends on the hardware inventory class BitLocker (Win32_EncryptableVolume). The class is off by default. Turn it on in Client Settings, Hardware Inventory, Set Classes.
  • If the view is empty or missing, the class is not enabled or clients have not sent inventory since you enabled it.
  • "Off" also covers a drive that is encrypted but has protection suspended.
BitLocker encryption v_GS_ENCRYPTABLE_VOLUME v_R_System
✉

Get new articles in your inbox

SCCM guides, AI tools, automation tips — sent when published. No spam.