用 PowerShell 开启 BitLocker 磁盘加密

在命令行给磁盘开启 BitLocker 加密并生成恢复密钥,不用翻控制面板。

WindowsBitLocker 磁盘加密安全加密中风险
在管理员 PowerShell 中运行 Enable-BitLocker -MountPoint "C:" -EncryptionMethod XtsAes256 -UsedSpaceOnly -RecoveryPasswordProtector。

01命令

命令
$ Enable-BitLocker -MountPoint "C:" -EncryptionMethod XtsAes256 -UsedSpaceOnly -RecoveryPasswordProtector

02作用说明

BitLocker 会加密整个磁盘,即使硬盘被拆到别的电脑上也读不出内容。-UsedSpaceOnly 只加密已使用的区块,首轮加密速度快得多;-RecoveryPasswordProtector 会生成 48 位恢复密钥,在 TPM 校验失败时用来解锁磁盘。恢复密钥会显示在屏幕上——务必立即备份。

03风险

风险中风险
使用条件Windows Pro/Enterprise/Education, a TPM chip, and administrator PowerShell. Save the 48-digit recovery key somewhere safe — without it you cannot unlock the drive after hardware changes.
!注意: 如果更换主板或 TPM 后没有恢复密钥,数据可能永远无法解密——继续之前请把密钥存到微软账户或打印出来。

04撤销

撤销
$ Disable-BitLocker -MountPoint "C:"

05来源

  • Enable-BitLocker
    Microsoft Learn · vendor-doc · 2026-09-17
    依据: Documents the MountPoint, EncryptionMethod, UsedSpaceOnly and RecoveryPasswordProtector parameters for turning on BitLocker encryption.

最后验证: 2026-09-18 · 分类: 安全与隐私

06相关方案