Initialize and Audit BitLocker
Description
Applies the BitLocker configuration set in the cPVAL custom fields to the drive in cPVAL MountPoint, then records the BitLocker, Secure Boot and TPM status of the device in NinjaOne custom fields. It runs as the automation of the Enable BitLocker - Laptop, Enable BitLocker - Desktop and Enable BitLocker - Server compound conditions when BitLocker Initialization - Detection reports a needed fix, and can also be run on demand.
The automation checks the drive in the same order as the detection script and takes the first action that applies:
| Drive state | Action |
|---|---|
| Decrypting, or waiting for the BitLocker hardware test at the next restart | None |
| Not encrypted | Encrypts the drive with the configured settings |
| Force is checked and the drive is not encrypting | Turns BitLocker off and encrypts the drive again |
| System drive protected only by a recovery password, recovery key or Active Directory account | Adds a TPM protector without decrypting, then turns protection on |
| A different TPM based protector or encryption method than configured | Turns BitLocker off and encrypts the drive again |
| Encrypted without key protectors (Windows device encryption waiting for activation) | Adds the key protectors and turns protection on |
| Configured protector missing, encryption paused, or protection suspended until resumed manually | Fixes it without decrypting |
| Matches the configuration, or protection suspended for a set number of restarts | None |
After turning BitLocker off, the automation waits up to 15 minutes for decryption. When decryption finishes in time, the drive is encrypted again in the same run. Otherwise, the next detection run encrypts it once decryption completes. The drive is unprotected until then, and BitLocker is only turned off when the TPM needed to encrypt again is present and ready.
The encryption itself is done by the Initialize-BitLockerVolume script, which the automation downloads from the ProVal content repository and runs only when it carries a valid ProVal signature. The automation verifies its own signature first. When either check fails, it stops before changing the drive or the custom fields.
At the end of every run, successful or not, apart from one stopped by a failed signature check, the automation writes the same custom fields as BitLocker and TPM Audit. The drive's recovery passwords are therefore in cPVAL BitLocker Info even when the device restarts before they reach Active Directory or Microsoft Entra ID.
RecoveryPassword,RecoveryKeyandAdAccountcannot unlock the system drive at startup by themselves, so the automation always adds a TPM protector alongside them on that drive. When the TPM is missing, or not ready and cPVAL Allow TPM Or Reboot does not allow initializing it, the drive is left unchanged.- Windows Home editions are not supported. Servers need the BitLocker Drive Encryption feature.
- When cPVAL MountPoint is blank, the system drive is used.
Requirements
- Windows PowerShell 5.1, run as System.
- Access to
contentrepo.net. - The custom fields listed below, including cPVAL TPM Info.
Sample Run

Dependencies
- Custom Field - cPVAL MountPoint
- Custom Field - cPVAL EncryptionMethod
- Custom Field - cPVAL KeyProtectorType
- Custom Field - cPVAL PIN Or Password
- Custom Field - cPVAL Path Or ADAccount
- Custom Field - cPVAL Allow TPM Or Reboot
- Custom Field - cPVAL SkipHardwareTest
- Custom Field - cPVAL BitLocker Info
- Custom Field - cPVAL BitLocker Enabled for System Drive
- Custom Field - cPVAL TPM Info
- Automation - BitLocker Initialization - Detection
- Agnostic - Initialize-BitLockerVolume
- Solution - BitLocker Initialize - NinjaOne
- Solution - BitLocker and TPM Audit
Custom Fields
| Field Label | Scope | Accepted Values | Default Value | Description |
|---|---|---|---|---|
| cPVAL MountPoint | Organization, Location, Device | A drive letter: D, D: or D:\ | System drive | The drive to enforce BitLocker on. |
| cPVAL EncryptionMethod | Organization, Location, Device | Aes128, Aes256, XtsAes128, XtsAes256 | XtsAes128 | The encryption method. A drive encrypted with another method is decrypted and encrypted again. |
| cPVAL KeyProtectorType | Organization, Location, Device | Tpm, TpmPin, TpmStartup, TpmPinStartup, Password, Startup, RecoveryKey, RecoveryPassword, AdAccount | RecoveryPassword | The key protector. RecoveryPassword, RecoveryKey and AdAccount also get a TPM protector on the system drive. |
| cPVAL PIN Or Password | Organization, Location, Device | A PIN, a password, or a 48-digit recovery password | - | Required for TpmPin, TpmPinStartup and Password. Optional recovery password for RecoveryPassword. |
| cPVAL Path Or ADAccount | Organization, Location, Device | A folder path, or a domain account or group | - | Required for TpmStartup, TpmPinStartup, Startup, RecoveryKey and AdAccount. |
| cPVAL Allow TPM Or Reboot | Organization, Location, Device | 0 = None, 1 = Initialize the TPM, 2 = Restart, 3 = Both | 0 | Whether the automation may initialize the TPM and restart the device. |
| cPVAL SkipHardwareTest | Organization, Location, Device | Checked or unchecked | Unchecked | Starts encryption without the hardware test at the next restart. |
| cPVAL BitLocker Info | Device | Written by the automation | - | Every BitLocker volume and key protector, including recovery passwords. |
| cPVAL BitLocker Enabled for System Drive | Device | Written by the automation | - | Checked when the system drive has a key protector. |
| cPVAL TPM Info | Device | Written by the automation | - | TPM details. |
| cPVAL Audit fields of BitLocker and TPM Audit | Device | Written by the automation | - | Optional. Written when they exist; the run does not fail without them. |
Parameters
| Name | Type | Description |
|---|---|---|
| Force | Checkbox | Turns BitLocker off on an encrypted drive and encrypts it again with the settings from the custom fields. The drive is unprotected while it decrypts. |
Automation Setup/Import
Output
- Activity log, including the Initialize-BitLockerVolume log of the run
C:\ProgramData\_Automation\Script\Initialize-BitLockerVolume\Initialize-BitLockerVolume-log.txt- Custom fields:
- cPVAL BitLocker Info
- cPVAL BitLocker Enabled for System Drive
- cPVAL TPM Info
- The cPVAL Audit fields of BitLocker and TPM Audit, when they exist
Changelog
2026-10-26
- Renamed the automation from Initialize BitLocker to Initialize and Audit BitLocker.
- A system drive protected only by a recovery password, recovery key or Active Directory account now gets a TPM protector before protection is turned on, and is left unchanged when the TPM cannot be used.
- The drive is checked in the same order as the detection script. Missing protectors, Windows device encryption waiting for activation, paused encryption and suspended protection are fixed without decrypting.
- BitLocker is turned off only when the TPM needed to encrypt again is ready, and encryption no longer starts while the drive is still decrypting.
- The signatures of the automation and the Initialize-BitLockerVolume script are verified before anything runs.
- The automation writes the same custom fields as BitLocker and TPM Audit, including cPVAL TPM Info.
- Moved the Force parameter to this document, and removed the output screenshots, which the custom field documents show.
2025-12-16
- Initial version of the document