代码之家  ›  专栏  ›  技术社区  ›  Andrew J. Brehm

以编程方式挂起Bitlocker?

  •  0
  • Andrew J. Brehm  · 技术社区  · 15 年前

    3 回复  |  直到 15 年前
        1
  •  -1
  •   Hans Olsson    15 年前

    编辑:找到了更好的答案。

    实际上有一个叫做 Win32_EncryptableVolume 也许可以用它来做这件事。它有一个 Decrypt 可能有用的方法。

    下面是旧答案

    在Windows7中,查看工具 manage-bde.exe manage-bde.wsf .

    假设他们可以做你想做的事,你应该可以用你的.Net应用程序中的相关参数来调用他们。

        2
  •  1
  •   Nathan Goings    9 年前

    命令行:

    manage-bde -protectors -disable <drive letter>:
    manage-bde -protectors -enable <drive letter>:
    

    Powershell(WMI)

    $bitlocker = Get-WmiObject -Namespace root\cimv2\Security\MicrosoftVolumeEncryption -Class Win32_EncryptableVolume
    $bitlocker.DisableKeyProtectors()
    $bitlocker.EnableKeyProtectors()
    

    using System.Management // add reference
    // ...
    
    // disable Bitlocker
    ManagementObject classInstance = new ManagementObject(@"root\cimv2\Security\MicrosoftVolumeEncryption", "Win32_EncryptableVolume.DriveLetter='C:'", null);
    ManagementBaseObject outParams = classInstance.InvokeMethod("DisableKeyProtectors", null, null);
    
    // enable Bitlocker
    outParams = classInstance.InvokeMethod("EnableKeyProtectors", null, null);
    
        3
  •  0
  •   mtlynch Stewie    14 年前

    Win32EncryptableVolume WMI提供程序具有 DisableKeyProtectors

    推荐文章