I'm trying to get BitLocker information from a remote host. I used to do this using PowerShell (Get-BitLockerVolume) which would provide lots of useful information. When I try using C#, I don't get as much information back. Looking on Microsoft's website and from further research, I can't find anything to help me.
Does anyone know how to get the same output as Get-BitLockerVolume in C#?
By the way, this is what I've been testing within C#:
CimSession session = CimSession.Create(computerHostName);
IEnumerable<CimInstance> GI1 = session.QueryInstances(@"root\cimv2\Security\MicrosoftVolumeEncryption", "WQL", "SELECT * FROM Win32_EncryptableVolume");
foreach(CimInstance i in GI1)
{
Console.WriteLine("MountPoint: {0}, Protection: {1}",
i.CimInstanceProperties["DriveLetter"].Value,
i.CimInstanceProperties["ProtectionStatus"].Value);
}