Turn On BitLocker Encryption with PowerShell
Encrypt your drive with BitLocker from the command line and get a recovery password.
01Command
$ Enable-BitLocker -MountPoint "C:" -EncryptionMethod XtsAes256 -UsedSpaceOnly -RecoveryPasswordProtector02What 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
04Undo
$ Disable-BitLocker -MountPoint "C:"05Sources
- Enable-BitLockerEvidence: Documents the MountPoint, EncryptionMethod, UsedSpaceOnly and RecoveryPasswordProtector parameters for turning on BitLocker encryption.
Last verified: 2026-09-18 · Category: Security & Privacy
06Related solutions
Understand PowerShell's execution policy scopes and set the one that lets you run your own local scripts without gutting the security model.
Two-step command sequence that makes you the owner of a locked file tree and grants yourself full control — the standard fix for 'Access is denied' on old profiles and OS reinstall leftovers.
Built-in Windows command to compute MD5, SHA1 or SHA-256 hashes of any file.