-1

How can I programmatically prepare a drive for BitLocker.

I get VMs with OS and System volumes in the same volume and would like to enable BitLocker. Like this:

Single OS and System Volume

The BitLocker Wizard will prepare the drive like so: BitLocker Drive Preparation Wizard

The outcome will look like this: Separate OS and System Volumes

I'd like to be able to do this in PowerShell or really any scripted way.

I've tried using the New-Partition cmdlet, but that doesn't work.

1 Answers1

0

Have you installed the BitLocker Module? I think the Enable-BitLocker is what you are looking for.

PS> Import-Module BitLocker WARNING: The names of some imported commands from the module 'BitLocker' include unapproved verbs that might make them less discoverable. To find the commands with unapproved verbs, run the Import -Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb.

PS> Get-Command -Module BitLocker

CommandType Name Version Source


Function Add-BitLockerKeyProtector 1.0.0.0 BitLocker
Function Backup-BitLockerKeyProtector 1.0.0.0 BitLocker
Function BackupToAAD-BitLockerKeyProtector 1.0.0.0 BitLocker
Function Clear-BitLockerAutoUnlock 1.0.0.0 BitLocker
Function Disable-BitLocker 1.0.0.0 BitLocker
Function Disable-BitLockerAutoUnlock 1.0.0.0 BitLocker
Function Enable-BitLocker 1.0.0.0 BitLocker
Function Enable-BitLockerAutoUnlock 1.0.0.0 BitLocker
Function Get-BitLockerVolume 1.0.0.0 BitLocker
Function Lock-BitLocker 1.0.0.0 BitLocker
Function Remove-BitLockerKeyProtector 1.0.0.0 BitLocker
Function Resume-BitLocker 1.0.0.0 BitLocker
Function Suspend-BitLocker 1.0.0.0 BitLocker
Function Unlock-BitLocker 1.0.0.0 BitLocker

  • Thanks. The volume needs to be prepared before BitLocker can be enabled. I found a tool that will do the preparation that I need. – Frederic Mokren Jan 07 '21 at 19:01