Unlock Multiple BitLocker Drives With a Batch File

A .bat file can unlock several BitLocker data drives by running manage-bde once for each drive. Use the option that asks for a password so you can enter each drive's password without saving those passwords inside the script.

This works after Windows starts and the data drives are connected. It doesn't bypass BitLocker or unlock the Windows startup drive before boot. Each drive needs a valid password or recovery method.

Check the drive letters and unlock one drive first

Connect the data drives, open File Explorer, and select This PC. Write down the current letters for the drives you intend to unlock. External-drive letters can change when other storage devices are connected.

Search Start for cmd. Right-click the Command Prompt result. Choose Run as administrator in its menu. Approve the Windows permission prompt. Run this read-only command to see the drives' BitLocker information:

manage-bde -status
Drawing of Command Prompt showing the BitLocker status command

Read Lock Status for each drive to see whether it still needs unlocking. Conversion Status and Protection Status tell you other things about its encryption; neither replaces the Lock Status reading.

For a data drive currently assigned D:, run:

manage-bde -unlock D: -password

Enter that drive's password when prompted. Replace D: with your actual data-drive letter. Check that its folders now open in File Explorer before putting the command into a longer script.

Microsoft's unlock command reference lists the password-prompt option. Get one drive working before adding a loop.

If that password fails, stop and recover access to that drive first. A batch file repeats commands; it can't repair a wrong password or turn one drive's recovery key into a key for every drive.

Save a short batch file with an explicit drive list

Open Notepad and paste this script. The example names D:, E:, and F: only. Replace that list with the letters you just checked, leaving out your Windows system drive.

@echo off
for %%D in (D: E: F:) do (
    echo Unlocking %%D
    manage-bde -unlock %%D -password
)
echo Review each drive's lock status:
manage-bde -status
pause

Choose File > Save as. Set Save as type to All files, and use a name such as UnlockDataDrives.bat. Choose a familiar location, such as Documents, for the saved script.

The .bat ending makes this a Windows batch file. If it was saved as UnlockDataDrives.bat.txt, it will open as a text document instead of running. In File Explorer, display file name extensions and correct the ending if needed.

On Windows 11, use View > Show > File name extensions. On Windows 10, use the View tab and enable File name extensions. Check the full name before moving on.

The script asks you to type passwords each time. Keep passwords and numerical recovery keys out of shared or synced text files, even if typing them each time takes longer. Anyone who can read that file could copy your passwords or keys.

Run it and read the result for each volume

Right-click the saved batch file and select Run as administrator. Approve the permission prompt. The window works through the listed letters, showing each drive letter before asking for its password.

Enter the password that belongs to the drive named immediately before the prompt. Different drives can have different passwords. Sharing a password between drives doesn't make their recovery keys interchangeable.

At the end, the script runs manage-bde -status. Check Lock Status for every intended volume, then open a folder on each one. The final pause keeps the window visible while you read the result.

Each drive can succeed or fail on its own, so read the result for each one. If D: opens and E: stays locked, the useful next check is E:'s letter and password.

The script doesn't decrypt the drives or remove their protection. It unlocks their files for the current Windows session. Don't replace the unlock command with a command that turns BitLocker off.

For a volume showing BitLocker waiting for activation, check that separate protection state. A drive being readable and its protection being fully configured are different questions.

Use two percent signs in a file, one at the prompt

The loop variable in a batch file is %%D. Both the loop declaration and the commands inside its parentheses need that same variable. The letter D in %%D is a variable name, not an instruction to use only drive D:.

Typing the loop directly into Command Prompt uses %D instead. Mixing the two forms is a common reason a copied loop fails before it ever reaches an unlock attempt.

I'd keep the saved script in the multi-line form while setting it up. It's easier to check the drive list and read each command than a long line with several commands joined together.

Avoid a loop that guesses every possible drive letter. Listing just the drives you want to open keeps the script focused and makes a missing drive easier to spot.

Handle a missing password or changed drive letter

If the output says the drive can't be found, return to This PC and confirm it's connected and which letter it currently has. Update the list in Notepad, save the file, and retry that volume on its own.

When a drive needs a recovery password instead, use -recoverypassword followed by that drive's 48-digit value. Run that recovery step separately rather than embedding the value into your reusable script.

For a .bek recovery-key file, the command uses -recoverykey and the path to that file. A saved text copy of a numerical key and a .bek file are different recovery methods with different command options.

Use the BitLocker recovery-key locations when the password or key you need is missing. For a managed computer, ask IT to match the drive's recovery-key identifier to its stored key.

If the correct recovery password or key still fails, report the error to Microsoft Support or IT, along with the drive's letter and lock status. Keep the key private. Don't format the drive to troubleshoot it when you still need its files.

The Short Version

Test manage-bde on one data drive, then place the verified letters in a .bat loop using %%D. Run it as administrator, enter each password at its prompt, and check Lock Status for every drive. Keep recovery keys out of the saved script.

Checked December 4, 2026.

If you have any business, I can build it online

Hi, I’m Hamza. I’ve been building websites and online shops for business owners since 2019, and I also built this site you’re reading.

Tell me what business you have or what you’re working on. I’ll look into how much it can grow online, and then we talk. You don’t have to buy anything or hire me first.

Chat with me on my site and I’ll show you proof of businesses I’ve helped and how they’ve grown.

Written by Isaac Smith

Isaac Smith is the founder and editor of PC Glance, a website that covers computers, laptops, and technology. He is a tech enthusiast and a computer geek who loves to share his insights and help his readers make smart choices when buying tech gadgets or laptops. He is always curious and updated about the latest tech trends.

More from Isaac Smith

Leave a Comment