Script to unlock Bitlocker encrypted drive at startup using task scheduler

=============================================


# Run as Administrator

$DriveLetter = "E:"

$Password = "Welcome@1989!"  # Replace with the actual BitLocker password

# Convert plain text password to secure string

$SecurePassword = ConvertTo-SecureString -String $Password -AsPlainText -Force

# Unlock the drive

Unlock-BitLocker -MountPoint $DriveLetter -Password $SecurePassword


# Enable auto-unlock (stores the key protector securely so password not needed at startup)

Enable-BitLockerAutoUnlock -MountPoint $DriveLetter


Create Task Scheduler
















Select Start a program

Program/Script: powershell.exe

Add Arguments: -ExecutionPolicy Bypass -File "C:\Scripts\AutoUnlockBitlockerdrive.ps1"













No comments:

Post a Comment

Featured Post

HPE MSA 2040 configuration step by step

HPE MSA 2040 configuration Default IP range for HP SAN storage MSA 2040 is 10.0.0.1/2 You need to connect your laptop and storage with...