Turn On BitLocker Encryption with PowerShell

Encrypt your drive with BitLocker from the command line and get a recovery password.

WindowsbitlockersecurityencryptionMedium risk
Run Enable-BitLocker -MountPoint "C:" -EncryptionMethod XtsAes256 -UsedSpaceOnly -RecoveryPasswordProtector in an admin PowerShell.

01Command

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

02What it does

BitLocker encrypts the whole drive so a thief can't read your files from another machine. -UsedSpaceOnly encrypts just the used blocks, letting the drive stay usable during the first (much faster) pass, and -RecoveryPasswordProtector generates the 48-digit key that unlocks the drive if the TPM can't. The recovery password prints to the console — back it up immediately.

03Risk

RiskMedium risk
RequirementsWindows 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.
!Warning: Losing the recovery password can mean losing all data after a motherboard or TPM change — save it to your Microsoft account or print it before continuing.

04Undo

Undo
$ Disable-BitLocker -MountPoint "C:"

05Sources

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

Last verified: 2026-09-18 · Category: Security & Privacy

06Related solutions