Get BitLocker “Used Space Only Encrypted” value from PowerShell

Víctor Martínez 11 Reputation points
2023-09-14T08:24:52.7033333+00:00

Dears,

I am writing a powershell script to detect which computer has  the system volume partially encrypted.

With “manage-bde –status c:”  I get the “Conversion Status” field with the value: “Used Space Only Encrypted” 

With “Get-BitLockerVolume” can’t get this “Conversion Status” field…

Only found this solution (old fashion way) but don’t like it:

[bool](manage-bde -status $ENV:SystemDrive | Select-String "Used Space Only Encrypted").Count

True = Used Space Only Encryption

 Reading the “GetConversionStatus method of the Win32_EncryptableVolume class” I couldn’t found the correct value

https://learn.microsoft.com/en-us/windows/win32/secprov/getconversionstatus-win32-encryptablevolume

Neither in the “GetEncryptionMethod method of the Win32_EncryptableVolume class”, where give the same value for fully or partial encryption

https://learn.microsoft.com/en-us/windows/win32/secprov/getencryptionmethod-win32-encryptablevolume

Does anyone know how to get the “Conversion Status” value from “manage-bde” in powershell (I need the object, not just text string)?

Many thanks for your time!

Windows for business | Windows Server | User experience | PowerShell
{count} votes

1 answer

Sort by: Most helpful
  1. Erick Moreno 330 Reputation points
    2024-08-06T19:12:25.03+00:00

    Have you tried to save the result from your command

    $result = .\manage-bde.exe c: -status
    #Then access the 8th element of the array. 
    $result[8]
    #I know you want it as an object so you can work on a script to iterate and convert the array to a hash table or PS object to access the different properties.
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.