A *NEW* Kaseya Community is coming! The Community will be going into read-only mode on 9/28. Get more details: https://www.community.connectit.com/discussion/41381/a-new-kaseya-community-is-coming

Get Bitlocker Status and Decrypt Key

Jay Jansen
Jay Jansen Member CHOCOLATE MILK
edited June 20 in Solutions

Product Name: Get Bitlocker Status and Decrypt Key

Description : This script will check the status of Bitlocker on the C:\ Drive of the machine and return it's status as well as the decrypt key to a custom field if enabled.

Instructions :

This script requires a custom field to be created called "Bitlocker Status:" with a type of STRING

Edit the script and update Line 2,8,10,16, and 18 with the newly created custom field and save it before running.

Comments

  • Norberto
    Norberto Member CHOCOLATE MILK
    edited May 2018
    Need help with this.

    I receive this error:

    script summary: Failed THEN in step 2 (Line2)
  • Oliver Heymanns
    edited May 2018
    Hi Noberto, you have to edit the procedure, line 2 you can choose which field to update......now iam stuck in line 3 "Failed Then in step 3
  • Wynema Ware
    Wynema Ware Member
    edited June 2018

    Any luck with Failed then in step 3?

  • Craig Dean
    Craig Dean Member
    edited August 2018

    Anyone got any instructions on this, I'm struggling too. 

  • John Rutkowski
    John Rutkowski Member CHOCOLATE MILK
    edited September 2018

    i had no trouble. followed the instructions, works great.

  • Dan Neuwirth
    Dan Neuwirth Member CHOCOLATE MILK
    edited September 2018

    Worked beautifully for me.  The hardest thing was trying to figure out how to add a custom field into Kaseya, but once I found it (Audit -> Machine Summary -> [New Custom Field]) and added the custom field everything worked flawlessly the first pass.  Launched the script on approximately 1100 managed systems and within 5 minutes I had the Bitlocker status and keys for every single desktop/laptop node.  Excellent.

  • Onno de Vries
    Onno de Vries Member, Kaseya Certified CHOCOLATE MILK
    edited January 2019

    Hello Cliff,

    Please tell me, what the interface shows as error (line number and Agent Procedure Log information),  and as you recon it's the changed manage-bde command, please also run this command in Powershell "(Get-BitLockerVolume -MountPoint C).KeyProtector.recoverypassword" on a station of which you know is encrypted with bitlocker and feed me the result of it (keeping in mind to not send any sensitive data, replacing the key with X's for instance)?

    Regards,

    Onno

  • Dusty Frey
    Dusty Frey Member
    edited July 2019

    Works great, thank you.

  • KaseyaUser
    KaseyaUser Member CHOCOLATE MILK
    edited September 2019

    I got the error on line 3 as well.  

    I solved it by replacing C:\temp in the script with the Kaseya temp directory variable: #vAgentConfiguration.agentTempDir#

    I found the variable file access errors by looking in the Agent Procedure log:
    Agent > Agent Logs > Agent Admin Logs tab > Agent sub-tab.

    I didn't want to have the change C:\temp permissions for all computers like shown below, that why I used the Kaseya system temp directory variable.

    https://helpdesk.kaseya.com/hc/en-gb/articles/229038408-Why-is-the-Agent-Set-Credential-test-having-troubleshooting-failures-


  • Rey Marquez
    Rey Marquez Member
    edited April 2020

    For failure in Step 2, your custom field string has to have the colon. If you look at the script, it looks for the string within the quotes.

    Incorrect: Bitlocker Status

    Correct: Bitlocker Status:

    You can either update your custom field or you can edit the script to remove the colon. I didn't try the latter, but it should work. Kaseya won't show the extra colon in the audit menu so no concern over having a double colon display.

  • Arman Qalhashahi
    Arman Qalhashahi Member CHOCOLATE MILK
    edited September 2020

    How can I add a custom field for EncryptionMethod?  

  • Jake Nichols
    Jake Nichols Member CHOCOLATE MILK
    edited September 2020

    @Arman
    Depending on what you are trying to capture you could use powershell to pipe the result you want to a custom field. 

  • Jake Nichols
    Jake Nichols Member CHOCOLATE MILK
    edited September 2020

    @Arman

    (Get-BitLockerVolume -MountPoint C).EncryptionMethod
  • Niels O
    Niels O Member
    edited September 2020

    It has always worked for me, but now I can't get the key/status and the Bitlocker is really on....also there are no fault codes it just says done.

  • John Rutkowski
    John Rutkowski Member CHOCOLATE MILK
    edited September 2020

    I'd like to see a version of this that sets the PIN code, so people know the drive is encrypted.

  • Mike Stanley
    Mike Stanley Member
    edited September 2020

    please tell me, what the interface shows as error (line number and Agent Procedure Log information),  and as you recon it's the changed manage-bde command, please also run this command in Powershell "(Get-BitLockerVolume -MountPoint C).KeyProtector.recoverypassword" on a station

  • Mike Stanley
    Mike Stanley Member
    edited September 2020

    please tell me, what the interface shows as error (line number and Agent Procedure Log information),  and as you recon it's the changed manage-bde command, please also run this command in Powershell "(Get-BitLockerVolume -MountPoint C).KeyProtector.recoverypassword" on a station bluestacks download omegle.

  • Spice Agent
    Spice Agent Member
    edited May 2021

    Anyone got any instructions on this, I'm struggling too. 

  • Erin Hasani
    Erin Hasani Member
    edited May 2021

    Could you elaborate the problem? I have it working fine. 

  • Erin Hasani
    Erin Hasani Member
    edited May 2021

    Could you elaborate the problem? I have it working fine. 

  • rodolfoberain
    rodolfoberain Member, Managed Service Provider CHOCOLATE MILK

    Errors out on "THEN" Line 3.

  • bboryczko@kaipartners.com
    [email protected] Member, Managed Service Provider CHOCOLATE MILK

    Works great, after creating the Custom Field (Audit -> Machine Summary -> [New Custom Field]) and updating the location of the temp txt file. I used #vAgentConfiguration.agentTempSecureDir# instead of C:\temp and made sure to update the file location of multiple steps. For some steps, you need to check the command being executed carefully, as the file location might be at the end of the command.

  • FordALT
    FordALT Member, Managed Service Provider CHOCOLATE MILK

    Worked great!

Weekly Leaderboard