Command Line Interface (CLI) for Hasleo BitLocker Anywhere For Mac.

Updated on September 17, 2024 by Admin to BitLocker for Mac

Hasleo BitLocker Anywhere For Mac has a command line interface (CLI) for users to perform operations without actually launching the graphical user interface (GUI), it allows you to issue commands from the Terminal or through the use of scripts.

Notes: Please note that Command Line Interface (CLI) is not available in the Professional Edition, please contact us to purchase the edition that supports CLI.

Download BitLocker For Windows Download BitLocker For Mac Download BitLocker For Linux

Tutorial to run command line interface (CLI) for BitLocker Anywhere For Mac.

Step 1. Download and install Hasleo BitLocker Anywhere For Mac.

install BitLocker Anywhere For Mac

Step 2. For macOS Mojave (10.14) and later, you need to grant Full Disk Access to Hasleo BitLocker Anywhere For Mac. For more information, please refer to Granting Full Disk Access to Hasleo BitLocker Anywhere For Mac.

grant full disk access

Step 3. Open Terminal and switch to root user.

Step 4. Navigate to the folder where BitLockerAnywhereCmd is located by typing in:
cd /Applications/Hasleo BitLocker Anywhere.app/Contents/MacOS

Step 5. Type "./BitLockerAnywhereCmd /?" for help, all the command and parameters of this tool will be listed as below:

Hasleo BitLocker Anywhere Command Line Tool [Version 9.3 (Build: Nov 23 2023)]
Copyright (C) 2023 Hasleo Software. All rights reserved.

/a <action> Specifies the action (activate/drives/encrypt/decrypt/lock/unlock) you want to perform.
activate: Activate the license key
drives: Lists drives
encrypt: encrypts the specified drive
decrypt: decrypts the specified drive
lock: lock the specified drive
unlock: unlock the specified drive
/? Produce a help message.

Options for 'activate' action:
/n <key> Specifies the license key.
/? Produce a help message.

Options for 'drives' action:
/? Produce a help message.

Options for 'encrypt' action:
/n <name> Specifies the name of the drive that you want to encrypt. You can perform
the 'drives' operation to view the name of all drives.
/p <password> Specifies the password used to encrypt the drive.
/u <used> (Optional) Specifies whether to encrypt the used disk space only, it
defaults to 0 if not provided.
0: No
1: Yes
/c <compatible> (Optional) Specifies whether to encrypt the drive using compatibility mode,
it defaults to 0 if not provided.
0: No
1: Yes
/s <strength> (Optional) Specifies whether to encrypt the drive using 256-bit encryption
strength, it defaults to 0 if not provided.
0: No
1: Yes
/r <recovery> (Optional) Specifies the path to save the BitLocker recovery key.
/i <silent> (Optional) Specifies the silent mode, it defaults to 0 if not provided.
0: Non-silent mode
1: Silent mode
/? Produce a help message.

Options for 'decrypt' action:
/n <name> Specifies the name of the drive that you want to decrypt. You can perform
the 'drives' operation to view the name of all drives.
/p <password> (Optional) Specifies the password used to decrypt the drive. You cannot
specify /p and /r at the same time.
/r <recovery> (Optional) Specifies the BitLocker recovery key used to decrypt the drive.
You cannot specify /p and /r at the same time.
/u <used> (Optional) Specifies whether to decrypt the used disk space only, it
defaults to 1 if not provided.
0: No
1: Yes
/i <silent> (Optional) Specifies the silent mode, it defaults to 0 if not provided.
0: Non-silent mode
1: Silent mode
/? Produce a help message.

Options for 'lock' action:
/n <name> Specifies the name of the drive that you want to lock. You can perform the
'drives' operation to view the name of all drives.
/s <silent> (Optional) Specifies the silent mode, it defaults to 0 if not provided.
0: Non-silent mode
1: Silent mode
/? Produce a help message.

Options for 'unlock' action:
/n <name> Specifies the name of the drive that you want to unlock. You can perform
the 'drives' operation to view the name of all drives.
/p <password> (Optional) Specifies the password used to unlock the drive. You cannot
specify /p and /r at the same time.
/r <recovery> (Optional) Specifies the BitLocker recovery key used to unlock the drive.
You cannot specify /p and /r at the same time.
/? Produce a help message.

Examples:
BitLockerAnywhereCmd /a drives
BitLockerAnywhereCmd /a encrypt /n /dev/disk1s1 /p 12345678 /u 1 /c 1 /s 1 /r /home/jason/keys /i 1

Command line interface for BitLocker in Mac

 

As you can see from the above, you can use the command-line interface provided by the Hasleo BitLocker Anywhere to encrypt drives with BitLocker, decrypt, lock and unlock BitLocker encrypted drives from the Terminal or scripts in Mac.

 

top