简体   繁体   English

通过命令提示符或Powershell C#定制密码锁

[英]Custom password bitlocker via command prompt or powershell C#

I'm stuck on a problem with BitLocker. 我陷入BitLocker的问题。

Essentially, I'm trying to develop a tool in C# that automatically encrypts external drives with a customized password and saves the recovery key (file) into a directory chosen by me. 本质上,我正在尝试使用C#开发一个工具,该工具可以使用自定义的密码自动加密外部驱动器,并将恢复密钥(文件)保存到我选择的目录中。

I found some commands to be executed via cmd , but unfortunately I'm only able to save the recovery key file without using a customized password. 我发现一些命令可以通过cmd执行,但是不幸的是,我只能在使用自定义密码的情况下保存恢复密钥文件。

Just to be more clear this is what I mean. 为了更清楚一点,这就是我的意思。 I'd like to set a custom password as I'm writing here: 我想在此处编写时设置自定义密码:

设置自定义密码

After I'd like to save the recovery file into a custom directory: 在将恢复文件保存到自定义目录后:

将恢复文件保存到自定义目录

Is that possible? 那可能吗? After reading a lot of references on Microsoft, I haven't found anything useful. 在阅读了许多有关Microsoft的参考资料之后,我没有发现任何有用的东西。

You can use WMI in C# or PowerShell to configure Bitlocker. 您可以在C#或PowerShell中使用WMI来配置Bitlocker。 There are also a bunch of Bitlocker cmdlets available in Windows 8.1 and above. Windows 8.1及更高版本中还提供了许多Bitlocker cmdlet。 You might want to look at this article for a deep dive on PowerShell and Bitlocker. 您可能想看一下这篇文章 ,以深入了解PowerShell和Bitlocker。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM