【发布时间】:2021-12-01 19:49:00
【问题描述】:
我必须将很多计算机加入一个新域,我想在所有计算机域中启用 bitlocker。 我想创建一个 GPO,当我将新计算机加入域时,bitlocker 会自动启用。 我找到的解决方案是创建一个脚本来执行此操作,然后创建一个 GPO 来部署此脚本并查看 GPO 是否有效。 我测试了这个脚本并且运行良好:
$CdriveStatus = Get-BitLockerVolume -MountPoint 'c:'
if ($CdriveStatus.volumeStatus -eq 'FullyDecrypted') {
C:\Windows\System32\manage-bde.exe -on c: -recoverypassword -skiphardwaretest
}
但是我想添加bitlocker的密码和恢复密码,但是我做不到。 我尝试了这些修改,但它不起作用,而且我在启动时出错:
-
用密码试试
$pass = ConvertTo-SecureString "密码" -AsPlainText -Force $CdriveStatus = 获取 BitLockerVolume -MountPoint 'c:' if ($CdriveStatus.volumeStatus -eq 'FullyDecrypted') { C:\Windows\System32\manage-bde.exe -on c: -password $pass -recoverypassword -skiphardwaretest }
-
尝试使用 PIN 码
$SecureString = ConvertTo-SecureString "1234" -AsPlainText -Force Enable-BitLocker -MountPoint c: -EncryptionMethod Aes256 -UsedSpaceOnly -Pin $SecureString -TPMandPinProtector
-
用密码试试
$pass = ConvertTo-SecureString Passw0rd -AsPlainText -Force Enable-BitLocker -MountPoint c:\ -EncryptionMethod Aes128 -Password $pass -PasswordProtector
请您帮帮我好吗? 非常感谢。
【问题讨论】:
标签: powershell active-directory gpo bitlocker