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
- Open SQL Server Management Studio and connect to the site database.
- Paste the query into a new query window.
- Run the query to check the C: drive of every computer.
- Change
@Driveto'%'to check every drive. - To see only unprotected drives, add the line
AND ev.ProtectionStatus0 <> 1to 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
More SCCM SQL queries
Count Configuration Manager client versions in your environment
Find computers that have not rebooted in 14 days
Find computers with low free space on the C: drive
Find computers with no hardware inventory in 30 days
Find duplicate computer names and duplicate serial numbers
List all computers with a named application installed