[英]PowerShell script that exports to CSV the computer Hostname, operating system and if Bitlocker is enabled or not
[英]Enabling Disk Encryption with BitLocker Via Powershell On the Operating System Drive (C:\)
我希望這里有人遇到了和我一樣的問題。
奇怪的是,運行我的 Powershell 腳本以啟用 Bitlocker,有時似乎達到 95%,但大多數時候它會失敗。
操作系統 - Windows 10 Professional 1809 GPO - 運行 Microsoft 的最佳實踐
我一直在閱讀通過 Powershell 設置 Bitlocker 的多個論壇和 Windows 最佳實踐,似乎沒有一個有具體的答案
Enable-BitLocker -MountPoint "C:" -EncryptionMethod Aes256 -RecoveryKeyPath "Valid Path" -RecoveryKeyProtector
do
{
$Volume = Get-BitLockerVolume -MountPoint C:
Write-Progress -Activity "Encrypting volume $($Volume.MountPoint)" -Status "Encryption Progress:" -PercentComplete $Volume.EncryptionPercentage
Start-Sleep -Seconds 1
}
until ($Volume.VolumeStatus -eq 'FullyEncrypted')
####################################################################
"Valid Path" refers to a valid UNC path with valid credentials.
輸出似乎回來了:
#################################################################
Enable-BitLockerInternal : Value does not fall within the expected range.
At C:\windows\system32\WindowsPowerShell\v1.0\Modules\BitLocker\BitLocker.psm1:3733 char:48
+ ... eInternal = Enable-BitLockerInternal -MountPoint $BitLockerVolumeInte ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,Enable-BitLockerInternal
我相信使用低於組策略要求的加密方法的自加密驅動器會發生這種情況。
我的修復:
manage-bde -off C:
刪除C:\\Windows\\System32\\Recovery
等待它解密
重新運行enable-bitlocker
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.