Coffeehouse Thread

1 post

Finding whether BitLocker is enabled for a volume

Back to Forum: Coffeehouse
  • soum

    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?

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.