繁体   English   中英

Bitlocker 和 Powershell

[英]Bitlocker And Powershell

我需要有关 powershell 命令的帮助 - Enable-Bitlocker

以下代码是一个示例:

$pw = ConvertTo-SecureString "123456" -AsPlainText -Force

Enable-BitLocker -MountPoint $env:SystemDrive -EncryptionMethod Aes256 -Pin $pw -TpmAndPinProtector -UsedSpaceOnly -SkipHardwareTest -ErrorAction SilentlyContinue

Start-Sleep 2

(Get-BitLockerVolume -MountPoint $env:HOMEDRIVE).KeyProtector > $env:UserProfile\Desktop\BitLocker_Recovery_Key.txt

我的问题是,这个命令唯一的output是,Bitlocker_Recovery_Key.txt中的如下

KeyProtectorId      : {CC2206C6-1B69-4DC1-96FE-38EED6F576E1}
AutoUnlockProtector : 
KeyProtectorType    : TpmPin
KeyFileName         : 
RecoveryPassword    : 
KeyCertificateType  : 
Thumbprint          : 

我的目标是获取恢复密码(48 字符串密码)作为我的 bitlocker 加密的备份。

提前致谢!

在更彻底地阅读了bitlocker的微软文档后,我设法解决了我自己的问题。

看来我已经完成了自动化过程所需的每一步,但是为了接收恢复密钥,我们需要添加一个恢复密码保护器(请注意,添加一个恢复密码保护器并不需要我们实际提交密码,而只是接收恢复密码和数字密码)接收密码的过程是通过使用powershell调用以下命令来实现的。

Invoke-Expression "Manage-bde -protectors -add <drive of choice or $i if in a loop> -RecoveryPassword"

激活保护器需要管理员权限,以下是 output 通过使用命令 manage-bde -protectors -get <$i or drive letter>

Volume : []
All Key Protectors

TPM And PIN:
  ID: 
  PCR Validation Profile:
    

Numerical Password:
  ID: id
  Password:
    password

Numerical Password:
  ID: id
  Password:
    password

只有这样我们才能在我们的方法中使用恢复密钥。

请注意,enable-bitlocker 或 manage-bde -on <drive or $i> 不会自动生成恢复密码,我们需要添加恢复密码保护程序。

暂无
暂无

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

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