Coffeehouse Post

Single Post Permalink

View Thread: Finding whether BitLocker is enabled for a volume
  • 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?