Enable BitLocker on C: Drive
This PowerShell script enables BitLocker on the C: drive and backs up the recovery key to AD or Azure AD.
Explanation of the Script Steps
1. Check BitLocker Status: The script first checks if BitLocker is already enabled on the C: drive. If it is, a message is displayed, and the script exits.
2. Enable BitLocker: If BitLocker is not enabled, the script enables it with TPM protection and the recovery password protector. It uses AES 256-bit encryption and only encrypts used space.
3. Monitor Encryption Progress: It checks the encryption progress and waits until it is complete, displaying the percentage completed.
4. Backup Recovery Key: After enabling BitLocker, the script attempts to back up the recovery key to Active Directory. If you want to back it up to Azure AD, you can uncomment the relevant line.
2. Requirements for Azure AD Backup
For backing up the recovery key to Azure AD, ensure:
• Your system is joined to Azure AD.
• The device is registered and managed through Azure AD.
Run the Script
1. Open PowerShell as an administrator.
2. Copy and paste the above script.
3. Make sure to replace "Domain\YourDomainAdmins" with your actual domain and group.
4. Run the script.
3. Verify Recovery Key Backup
To verify that the recovery key has been backed up:
• For Active Directory: Use the Active Directory Users and Computers (ADUC) tool. Navigate to the computer object, right-click, and select Properties. Under the BitLocker Recovery tab, you should see the recovery key.
• For Azure AD: You can check via the Azure portal under Azure Active Directory > Devices. Select the device, and you should see the BitLocker recovery key.
Last updated