Enable-bitlocker 및 lock-bitlocker를 연속적으로 수행할 수 없습니다.

Enable-bitlocker 및 lock-bitlocker를 연속적으로 수행할 수 없습니다.

다음 명령을 사용하여 Windows Server 2012 R2 데이터 볼륨에서 비트로커를 활성화하려고 합니다.

Enable-BitLocker -MountPoint $volume -Password ($password | ConvertTo-SecureString -AsPlainText -Force) -PasswordProtector

그 후에는 데이터 볼륨을 잠그려고합니다.

Lock-BitLocker $volume -ForceDismount

이제 여기서 문제는 데이터 볼륨을 잠갔기 때문에 암호화 프로세스가 보류된다는 것입니다. 전체 볼륨 암호화 후 데이터 볼륨을 잠그고 싶습니다. 암호화 프로세스가 완료된 후 데이터 볼륨을 잠그는 옵션이 있습니까? 도움이 필요하세요?

답변1

여기Get-BitLocker, 드라이브 상태 및 암호화 진행 상황을 찾는 데 사용할 수 있는 것 같습니다 .

PS C:\> Get-BitLockerVolume 
VolumeType      Mount CapacityGB VolumeStatus           Encryption KeyProtector              AutoUnlock Protection
                Point                                   Percentage                           Enabled    Status
----------      ----- ---------- ------------           ---------- ------------              ---------- ----------
Data            D:        931.51 EncryptionInProgress   1          {RecoveryPassword, Pas...            Off

를 호출하기 전에 다음과 같은 코드를 추가하여 Lock-BitLocker암호화가 완료되었는지 몇 초마다 확인할 수 있습니다.

do {
    Start-Sleep -Seconds 10
    $drive = Get-BitLocker -MountPoint $volume
} while ($drive.VolumeStatus -in @('FullyDecrypted','EncryptionInProgress'))

(이 코드는 테스트하지 않았습니다. 결국 VolumeStatus가 'FullyEncrypted'인지 확인할 수 있습니다.)

관련 정보