Coffeehouse Thread

1 post

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Finding whether BitLocker is enabled for a volume

Back to Forum: Coffeehouse
  • User profile image

    I am using WMI to see if BitLocker is enabled for a volume, using the code below.


    var path = new ManagementPath();
    path.NamespacePath = "\\ROOT\\CIMV2\\Security\\MicrosoftVolumeEncryption";
    path.ClassName = "Win32_EncryptableVolume";
    var scope = new ManagementScope(path, new ConnectionOptions() { Impersonation = ImpersonationLevel.Impersonate });
    var management = new ManagementClass(scope, path, new ObjectGetOptions());
    foreach (var vol in management.GetInstances())
        Console.WriteLine("{0} - {1}", vol["DriveLetter"], (uint)vol["ProtectionStatus"] == 1 ? "Active" : "Inactive");


    But it throws up Access denied error when run as standard user. Is there any way to get just the status information as standard user?

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.