有没有办法从.NET以编程方式挂起驱动器的Bitlocker?
发布于 2010-08-12 18:49:12
编辑:找到更好的答案。
实际上,有一个名为Win32_EncryptableVolume的WMI类可以用来以一种很好的方式实现这一点。它有一个可能有用的Decrypt方法。
下面是的旧答案
在Windows7中,查看工具manage-bde.exe,在Vista中查看脚本manage-bde.wsf。
假设它们可以做您想做的事情,那么您应该能够使用.Net应用程序中的相关参数来调用它们。
发布于 2015-12-17 08:20:16
命令行:
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()C#
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);发布于 2010-11-19 17:12:37
Win32EncryptableVolume WMI提供程序具有挂起卷上的BitLocker保护的DisableKeyProtectors方法。
https://stackoverflow.com/questions/3466806
复制相似问题