Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
202 views
in Technique[技术] by (71.8m points)

windows - Programmatically prepare drive for BitLocker

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.

question from:https://stackoverflow.com/questions/65601838/programmatically-prepare-drive-for-bitlocker

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...