Skip to main content

Bitlocker - Key Retrieval

Summary

This script audits the recovery keys for each encrypted drive on an agent and adds them to a custom table.

Time Saved by Automation: 5 Minutes

Sample Run

Sample Run

Dependencies

Variables

  • @PowerShellResult@ -> This variable shows whether BitLocker is enabled, retrieves the keys, and returns the corresponding information if it cannot be enabled.
  • @sqlletter@ -> SQL dataset cycling that returns the drive letter checked.

Process

  1. Creates the required table if it does not already exist in the database.
  2. Adds the required role definitions for the dataview.
  3. Queries the target machine(s) and runs PowerShell to return the BitLocker key or the BitLocker status.
  4. Writes the key back into the Automate database if it is found to be encrypted.

Output

  • Script log
  • Role
  • Dataview