Powershell Commandlets - BITLOCKER Module
Powershell Commandlets - BITLOCKER Module
BITLOCKER
By Les Lewis
1|Page
Powershell Commandlet Reference: BITLOCKER
Contents
Add-BitLockerKeyProtector ........................................................................................................................ 6
SYNOPSIS ............................................................................................................................................. 6
SYNTAX .................................................................................................................................................. 6
DESCRIPTION ...................................................................................................................................... 6
PARAMETERS ........................................................................................................................................ 8
INPUTS ................................................................................................................................................ 12
OUTPUTS.............................................................................................................................................. 12
Example 1: Add key protector .............................................................................................................. 12
Example 2: Add a recovery key for all BitLocker volumes .................................................................... 12
Example 3: Add credentials as a key protector .................................................................................... 12
RELATED LINKS ............................................................................................................................... 13
Backup-BitLockerKeyProtector ................................................................................................................. 14
SYNOPSIS ........................................................................................................................................... 14
SYNTAX ................................................................................................................................................ 14
DESCRIPTION .................................................................................................................................... 14
PARAMETERS ...................................................................................................................................... 14
INPUTS ................................................................................................................................................ 15
OUTPUTS.............................................................................................................................................. 15
Example 1: Save a key protector for a volume ..................................................................................... 15
Example 2: Save a key protector using an ID ........................................................................................ 16
RELATED LINKS ............................................................................................................................... 16
Clear-BitLockerAutoUnlock ................................................................................................................... 17
SYNOPSIS ........................................................................................................................................... 17
SYNTAX ................................................................................................................................................ 17
DESCRIPTION .................................................................................................................................... 17
PARAMETERS ...................................................................................................................................... 17
INPUTS ................................................................................................................................................ 17
OUTPUTS.............................................................................................................................................. 17
Example 1: Clear automatic unlocking keys ......................................................................................... 18
RELATED LINKS ............................................................................................................................... 18
Disable-BitLocker ...................................................................................................................................... 19
SYNOPSIS ........................................................................................................................................... 19
2|Page
Powershell Commandlet Reference: BITLOCKER
SYNTAX ................................................................................................................................................ 19
DESCRIPTION .................................................................................................................................... 19
PARAMETERS ...................................................................................................................................... 19
INPUTS ................................................................................................................................................ 20
OUTPUTS.............................................................................................................................................. 20
Example 1: Disable BitLocker for a volume .......................................................................................... 20
Example 2: Disable BitLocker for all volumes ....................................................................................... 20
RELATED LINKS ............................................................................................................................... 20
Disable-BitLockerAutoUnlock ................................................................................................................... 21
SYNOPSIS ........................................................................................................................................... 21
SYNTAX ................................................................................................................................................ 21
DESCRIPTION .................................................................................................................................... 21
PARAMETERS ...................................................................................................................................... 21
INPUTS ................................................................................................................................................ 22
OUTPUTS.............................................................................................................................................. 22
Example 1: Disable automatic unlocking for a volume......................................................................... 22
RELATED LINKS ............................................................................................................................... 22
Enable-BitLocker ....................................................................................................................................... 23
SYNOPSIS ........................................................................................................................................... 23
SYNTAX ................................................................................................................................................ 23
DESCRIPTION .................................................................................................................................... 24
PARAMETERS ...................................................................................................................................... 25
INPUTS ................................................................................................................................................ 30
OUTPUTS.............................................................................................................................................. 30
Example 1: Enable BitLocker ................................................................................................................. 30
Example 2: Enable BitLocker with a specified recovery key ................................................................. 31
Example 3: Enable BitLocker with a specified user account ............................................................. 31
RELATED LINKS ............................................................................................................................... 31
Enable-BitLockerAutoUnlock .................................................................................................................... 32
SYNOPSIS ........................................................................................................................................... 32
SYNTAX ................................................................................................................................................ 32
DESCRIPTION .................................................................................................................................... 32
PARAMETERS ...................................................................................................................................... 32
3|Page
Powershell Commandlet Reference: BITLOCKER
INPUTS ................................................................................................................................................ 33
OUTPUTS.............................................................................................................................................. 33
Example 1: Enable automatic unlocking ............................................................................................... 33
RELATED LINKS ............................................................................................................................... 33
Get-BitLockerVolume ................................................................................................................................ 34
SYNOPSIS ........................................................................................................................................... 34
SYNTAX ................................................................................................................................................ 34
DESCRIPTION .................................................................................................................................... 34
PARAMETERS ...................................................................................................................................... 34
INPUTS ................................................................................................................................................ 35
OUTPUTS.............................................................................................................................................. 35
Example 1: Get all BitLocker volumes ................................................................................................... 35
Example 2: Get a specific BitLocker volume ......................................................................................... 35
RELATED LINKS ............................................................................................................................... 36
Lock-BitLocker ........................................................................................................................................... 37
SYNOPSIS ........................................................................................................................................... 37
SYNTAX ................................................................................................................................................ 37
DESCRIPTION .................................................................................................................................... 37
PARAMETERS ...................................................................................................................................... 37
INPUTS ................................................................................................................................................ 38
OUTPUTS.............................................................................................................................................. 38
Example 1: Lock a volume..................................................................................................................... 38
RELATED LINKS ............................................................................................................................... 38
Remove-BitLockerKeyProtector................................................................................................................ 39
SYNOPSIS ........................................................................................................................................... 39
SYNTAX ................................................................................................................................................ 39
DESCRIPTION .................................................................................................................................... 39
PARAMETERS ...................................................................................................................................... 39
INPUTS ................................................................................................................................................ 40
OUTPUTS.............................................................................................................................................. 40
Example 1: Remove a key protector for a volume ............................................................................... 40
RELATED LINKS ............................................................................................................................... 41
Resume-BitLocker ..................................................................................................................................... 42
4|Page
Powershell Commandlet Reference: BITLOCKER
SYNOPSIS ........................................................................................................................................... 42
SYNTAX ................................................................................................................................................ 42
DESCRIPTION .................................................................................................................................... 42
PARAMETERS ...................................................................................................................................... 42
INPUTS ................................................................................................................................................ 43
OUTPUTS.............................................................................................................................................. 43
Example 1: Resume protection for a volume ....................................................................................... 43
Example 2: Resume protection for all volumes on a computer ........................................................... 43
RELATED LINKS ............................................................................................................................... 43
Suspend-BitLocker .................................................................................................................................... 44
SYNOPSIS ........................................................................................................................................... 44
SYNTAX ................................................................................................................................................ 44
DESCRIPTION .................................................................................................................................... 44
PARAMETERS ...................................................................................................................................... 44
INPUTS ................................................................................................................................................ 45
OUTPUTS.............................................................................................................................................. 45
Example 1: Suspend BitLocker protection ............................................................................................ 45
RELATED LINKS ............................................................................................................................... 46
Unlock-BitLocker ....................................................................................................................................... 47
SYNOPSIS ........................................................................................................................................... 47
SYNTAX ................................................................................................................................................ 47
DESCRIPTION .................................................................................................................................... 47
PARAMETERS ...................................................................................................................................... 47
INPUTS ................................................................................................................................................ 49
OUTPUTS.............................................................................................................................................. 49
Example 1: Unlock a volume ................................................................................................................. 49
RELATED LINKS ............................................................................................................................... 49
5|Page
Powershell Commandlet Reference: BITLOCKER
Add-BitLockerKeyProtector
SYNOPSIS
Adds a key protector for a BitLocker volume.
SYNTAX
Add-BitLockerKeyProtector [-MountPoint] <String[]> [-
ADAccountOrGroup] <String> [-Service] -ADAccountOrGroupProtector [-
Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Add-BitLockerKeyProtector cmdlet adds a protector for the volume
key of the volume protected with BitLocker Drive Encryption.
6|Page
Powershell Commandlet Reference: BITLOCKER
You can add only one of these methods or combinations at a time, but
you can run this cmdlet more than once on a volume.
For a password or PIN key protector, specify a secure string. You can
use the ConvertTo-SecureString cmdlet to create a secure string. You can
use secure strings in a script and still maintain confidentiality of
passwords.
7|Page
Powershell Commandlet Reference: BITLOCKER
If you use startup key or recovery key as part of your key protector,
provide a path to store the key. This cmdlet stores the name of the file
that contains the key in the KeyFileName field of the KeyProtector field
in the BitLocker volume object.
PARAMETERS
-ADAccountOrGroup <String>
Specifies an account using the format Domain\User. This cmdlet
adds the account you specify as a key protector for the volume encryption
key.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ADAccountOrGroupProtector [<SwitchParameter>]
Indicates that BitLocker uses an AD DS account as a protector for
the volume encryption key.
Required? true
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-MountPoint <String[]>
Specifies an array of drive letters or BitLocker volume objects.
This cmdlet adds a key protector to the volumes specified. To obtain a
BitLocker volume object, use the Get-BitLockerVolume cmdlet.
Required? true
Position? 1
Default value
Accept pipeline input? True (ByValue, ByPropertyName)
Accept wildcard characters? false
-Password <SecureString>
Specifies a secure string object that contains a password. The
cmdlet adds the password specified as a protector for the volume
encryption key.
8|Page
Powershell Commandlet Reference: BITLOCKER
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-PasswordProtector [<SwitchParameter>]
Indicates that BitLocker uses a password as a protector for the
volume encryption key.
Required? true
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-Pin <SecureString>
Specifies a secure string object that contains a PIN. The cmdlet
adds the PIN specified, with other data, as a protector for the volume
encryption key.
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-RecoveryKeyPath <String>
Specifies a path to a recovery key. This cmdlet adds the recovery
key stored in the specified path as a protector for the volume encryption
key.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-RecoveryKeyProtector [<SwitchParameter>]
Indicates that BitLocker uses a recovery key as a protector for
the volume encryption key.
Required? true
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-RecoveryPassword <String>
Specifies a recovery password. If you do not specify this
parameter, the cmdlet creates a random password. You can enter a 48 digit
password.
9|Page
Powershell Commandlet Reference: BITLOCKER
Required? false
Position? 2
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-RecoveryPasswordProtector [<SwitchParameter>]
Indicates that BitLocker uses a recovery password as a protector
for the volume encryption key.
Required? true
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-Service [<SwitchParameter>]
Indicates that the system account for this computer unlocks the
encrypted volume.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-StartupKeyPath <String>
Specifies a path to a startup key. The cmdlet adds the key stored
in the specified path as a protector for the volume encryption key.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-StartupKeyProtector [<SwitchParameter>]
Indicates that BitLocker uses a startup key as a protector for
the volume encryption key.
Required? true
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-TpmAndPinAndStartupKeyProtector [<SwitchParameter>]
Indicates that BitLocker uses a combination of TPM, a PIN, and a
startup key as a protector for the volume encryption key.
Required? true
10 | P a g e
Powershell Commandlet Reference: BITLOCKER
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-TpmAndPinProtector [<SwitchParameter>]
Indicates that BitLocker uses a combination of TPM and a PIN as a
protector for the volume encryption key.
Required? true
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-TpmAndStartupKeyProtector [<SwitchParameter>]
Indicates that BitLocker uses a combination of TPM and a startup
key as a protector for the volume encryption key.
Required? true
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-TpmProtector [<SwitchParameter>]
Indicates that BitLocker uses TPM as a protector for the volume
encryption key.
Required? true
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not
run.
Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
11 | P a g e
Powershell Commandlet Reference: BITLOCKER
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
BitLockerVolume[], string[]
OUTPUTS
BitLockerVolume[]
This example adds a combination of the TPM and a PIN as key protector
for the BitLocker volume identified with the drive letter C:.
The second command adds a protector to the BitLocker volume that has
the drive letter C:. The command specifies that this volume uses a
combination of the TPM and the PIN as key protector and provides the PIN
saved in the $SecureString variable.
This command gets all the BitLocker volumes for the current computer
and passes them to the Add-BitLockerKeyProtector cmdlet by using the pipe
operator. This cmdlet specifies a path to a recovery key and indicates
that these volumes use a recovery key as a key protector.
12 | P a g e
Powershell Commandlet Reference: BITLOCKER
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?linkid=287647
Backup-BitLockerKeyProtector
Remove-BitLockerKeyProtector
Get-BitLockerVolume
Enable-BitLocker
13 | P a g e
Powershell Commandlet Reference: BITLOCKER
Backup-BitLockerKeyProtector
SYNOPSIS
Saves a key protector for a BitLocker volume in AD DS.
SYNTAX
Backup-BitLockerKeyProtector [-MountPoint] <String[]> [-
KeyProtectorId] <String> [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Backup-BitLockerKeyProtector cmdlet saves a recovery password key
protector for a volume protected by BitLocker Drive Encryption to Active
Directory Domain Services (ADDS). Specify a key to be saved by ID.
PARAMETERS
-KeyProtectorId <String>
Specifies the ID for a key protector or a KeyProtector object. A
BitLocker volume object includes a KeyProtector object. You can specify
the
key protector object itself, or you can specify the ID. See the Examples
section. To obtain a BitLocker volume object, use the
Get-BitLockerVolume cmdlet.
Required? true
Position? 2
Default value
Accept pipeline input? True (ByValue, ByPropertyName)
Accept wildcard characters? false
-MountPoint <String[]>
Specifies an array of drive letters or BitLocker volume objects.
The cmdlet saves key protectors for the volumes specified. To obtain a
BitLocker volume object, use the Get-BitLockerVolume cmdlet.
Required? true
Position? 1
Default value
Accept pipeline input? True (ByValue, ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
14 | P a g e
Powershell Commandlet Reference: BITLOCKER
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not
run.
Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
BitLockerVolume, String
OUTPUTS
BitLockerVolume
The second command backs up the key protector for the BitLocker
volume specified by the MountPoint parameter. The command specifies the
key protector by using its ID, contained in the BitLocker object stored
in $BLV. The KeyProtector attribute contains an array of key protectors
associated to the volume. This command uses standard array syntax to
index the KeyProtector object. The key protector that corresponds to the
recovery password key protector can be identified by using the
KeyProtectorType attribute in the KeyProtector object.
15 | P a g e
Powershell Commandlet Reference: BITLOCKER
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?linkid=287648
Add-BitLockerKeyProtector
Remove-BitLockerKeyProtector
Get-BitLockerVolume
16 | P a g e
Powershell Commandlet Reference: BITLOCKER
Clear-BitLockerAutoUnlock
SYNOPSIS
Removes BitLocker automatic unlocking keys.
SYNTAX
Clear-BitLockerAutoUnlock [<CommonParameters>]
DESCRIPTION
The Clear-BitLockerAutoUnlock cmdlet removes all automatic unlocking
keys used by BitLocker Drive Encryption. BitLocker stores these keys for
the fixed data drives of a system on a volume that hosts a BitLocker-
enabled operating system volume so that it can automatically unlock the
fixed and removable data volumes in a system. This makes it easier for
users to access data volumes.
You must remove automatic unlocking keys before you can disable
BitLocker by using the Disable-BitLocker cmdlet. You can use the
Disable-BitLockerAutoUnlock cmdlet to remove keys for specific volumes
that use automatic unlocking instead of all volumes.
PARAMETERS
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
String
OUTPUTS
BitLockerVolume
17 | P a g e
Powershell Commandlet Reference: BITLOCKER
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?linkid=287649
Disable-BitLockerAutoUnlock
Enable-BitLockerAutoUnlock
Get-BitLockerVolume
18 | P a g e
Powershell Commandlet Reference: BITLOCKER
Disable-BitLocker
SYNOPSIS
Disables BitLocker encryption for a volume.
SYNTAX
Disable-BitLocker [-MountPoint] <String[]> [-Confirm] [-WhatIf]
[<CommonParameters>]
DESCRIPTION
The Disable-BitLocker cmdlet disables BitLocker Drive Encryption for
a BitLocker volume. When you run this cmdlet, it removes all key
protectors and begins decrypting the content of the volume.
If the volume that hosts the operating system contains any automatic
unlocking keys, the cmdlet does not proceed. You can use the
Clear-BitLockerAutoUnlock cmdlet to remove all automatic unlocking keys.
Then you can disable BitLocker for the volume.
PARAMETERS
-MountPoint <String[]>
Specifies an array of drive letters or BitLocker volume objects.
The cmdlet disables protection for the volumes specified. To obtain a
BitLocker volume object, use the Get-BitLockerVolume cmdlet.
Required? true
Position? 1
Default value
Accept pipeline input? True (ByValue, ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not
run.
Required? false
19 | P a g e
Powershell Commandlet Reference: BITLOCKER
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
BitLockerVolume[], String[]
OUTPUTS
BitLockerVolume[]
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?linkid=287650
Enable-BitLocker
Lock-BitLocker
Resume-BitLocker
Suspend-BitLocker
Unlock-BitLocker
Get-BitLockerVolume
20 | P a g e
Powershell Commandlet Reference: BITLOCKER
Disable-BitLockerAutoUnlock
SYNOPSIS
Disables automatic unlocking for a BitLocker volume.
SYNTAX
Disable-BitLockerAutoUnlock [-MountPoint] <String[]> [-Confirm] [-
WhatIf] [<CommonParameters>]
DESCRIPTION
The Disable-BitLockerAutoUnlock cmdlet disables automatic unlocking
for a volume protected by BitLocker Disk Encryption. The cmdlet removes
automatic unlocking keys for specified volumes stored on a volume that
hosts an operating system.
PARAMETERS
-MountPoint <String[]>
Specifies an array of drive letters or BitLocker volume objects.
The cmdlet disables automatic unlocking for the volumes specified. To
obtain a BitLocker volume object, use the Get-BitLockerVolume cmdlet.
Required? true
Position? 1
Default value
Accept pipeline input? True (ByValue, ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value false
21 | P a g e
Powershell Commandlet Reference: BITLOCKER
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not
run.
Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
BitLockerVolume[], String[]
OUTPUTS
BitLockerVolume[]
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?linkid=287651
Clear-BitLockerAutoUnlock
Enable-BitLockerAutoUnlock
Get-BitLockerVolume
22 | P a g e
Powershell Commandlet Reference: BITLOCKER
Enable-BitLocker
SYNOPSIS
Enables encryption for a BitLocker volume.
SYNTAX
Enable-BitLocker [-MountPoint] <String[]> [-AdAccountOrGroup]
<String> [-EncryptionMethod <BitLockerVolumeEncryptionMethodOnEnable>]
[-HardwareEncryption] [-Service] [-SkipHardwareTest] [-UsedSpaceOnly] -
AdAccountOrGroupProtector [-Confirm] [-WhatIf] [<CommonParameters>]
23 | P a g e
Powershell Commandlet Reference: BITLOCKER
DESCRIPTION
The Enable-BitLocker cmdlet enables BitLocker Drive Encryption for a
volume.
-- TPM and startup key. BitLocker uses a combination of the TPM and
input from of a USB memory device.
-- Startup key. BitLocker uses input from of a USB memory device that
contains the external key.
24 | P a g e
Powershell Commandlet Reference: BITLOCKER
You can specify only one of these methods or combinations when you
enable encryption, but you can use the Add-BitLockerKeyProtector cmdlet
to add other protectors.
For a password or PIN key protector, specify a secure string. You can
use the ConvertTo-SecureString cmdlet to create a secure string. You can
use secure strings in a script and still maintain confidentiality of
passwords.
If you use startup key or recovery key as part of your key protector,
provide a path to store the key. This cmdlet stores the name of the file
that contains the key in the KeyFileName field of the KeyProtector field
in the BitLocker volume object.
By default, this cmdlet encrypts the entire drive. If you use the
UsedSpaceOnly parameter, it only encrypts the used space in the disk.
This option can significant reduce encryption time.
PARAMETERS
-AdAccountOrGroup <String>
Specifies an account using the format Domain\User. This cmdlet
adds the account you specify as a key protector for the volume encryption
key.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
25 | P a g e
Powershell Commandlet Reference: BITLOCKER
-AdAccountOrGroupProtector [<SwitchParameter>]
Indicates that BitLocker uses an AD DS account as a protector for
the volume encryption key.
Required? true
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-EncryptionMethod <BitLockerVolumeEncryptionMethodOnEnable>
Specifies an encryption method for the encrypted drive. The
acceptable values for this parameter are:
-- Aes128
-- Aes256
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-HardwareEncryption [<SwitchParameter>]
Indicates that the volume uses hardware encryption.
Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-MountPoint <String[]>
Specifies an array of drive letters or BitLocker volume objects.
This cmdlet enables protection for the volumes specified. To obtain a
BitLocker volume object, use the Get-BitLockerVolume cmdlet.
Required? true
Position? 1
Default value
Accept pipeline input? True (ByValue, ByPropertyName)
Accept wildcard characters? false
-Password <SecureString>
Specifies a secure string object that contains a password. The
password specified acts as a protector for the volume encryption key.
Required? false
Position? 2
Default value
Accept pipeline input? false
26 | P a g e
Powershell Commandlet Reference: BITLOCKER
-PasswordProtector [<SwitchParameter>]
Indicates that BitLocker uses a password as a protector for the
volume encryption key.
Required? true
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-Pin <SecureString>
Specifies a secure string object that contains a PIN. BitLocker
uses the PIN specified, with other data, as a protector for the volume
encryption key.
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-RecoveryKeyPath <String>
Specifies a path to a recovery key. The key stored in the
specified path acts as a protector for the volume encryption key.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-RecoveryKeyProtector [<SwitchParameter>]
Indicates that BitLocker uses a recovery key as a protector for
the volume encryption key.
Required? true
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-RecoveryPassword <String>
Specifies a recovery password. If you do not specify this
parameter, but you do include the RecoveryPasswordProtector parameter,
the cmdlet creates a random password. You can enter a 48 digit password.
The password specified or created acts as a protector for the volume
encryption key.
Required? false
Position? 2
Default value
Accept pipeline input? false
27 | P a g e
Powershell Commandlet Reference: BITLOCKER
-RecoveryPasswordProtector [<SwitchParameter>]
Indicates that BitLocker uses a recovery password as a protector
for the volume encryption key.
Required? true
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-Service [<SwitchParameter>]
Indicates that the system account for this computer unlocks the
encrypted volume.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-SkipHardwareTest [<SwitchParameter>]
Indicates that BitLocker does not perform a hardware test before
it begins encryption. BitLocker uses a hardware test as a dry run to make
sure that all the key protectors are correctly set up and that the
computer can start without issues.
Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-StartupKeyPath <String>
Specifies a path to a startup key. The key stored in the
specified path acts as a protector for the volume encryption key.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-StartupKeyProtector [<SwitchParameter>]
Indicates that BitLocker uses a startup key as a protector for
the volume encryption key.
Required? true
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
28 | P a g e
Powershell Commandlet Reference: BITLOCKER
-TpmAndPinAndStartupKeyProtector [<SwitchParameter>]
Indicates that BitLocker uses a combination of the TPM, a PIN,
and a startup key as a protector for the volume encryption key.
Required? true
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-TpmAndPinProtector [<SwitchParameter>]
Indicates that BitLocker uses a combination of the TPM and a PIN
as a protector for the volume encryption key.
Required? true
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-TpmAndStartupKeyProtector [<SwitchParameter>]
Indicates that BitLocker uses a combination of the TPM and a
startup key as a protector for the volume encryption key.
Required? true
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-TpmProtector [<SwitchParameter>]
Indicates that BitLocker uses the TPM as a protector for the
volume encryption key.
Required? true
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-UsedSpaceOnly [<SwitchParameter>]
Indicates that BitLocker does not encrypt disk space which
contains unused data.
Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
29 | P a g e
Powershell Commandlet Reference: BITLOCKER
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not
run.
Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
BitLockerVolume[],String[]
OUTPUTS
BitLockerVolume[]
This example enables BitLocker for a specified drive using the TPM
and a PIN for key protector.
30 | P a g e
Powershell Commandlet Reference: BITLOCKER
This command gets all the BitLocker volumes for the current computer
and passes pipes them to the Enable-BitLocker cmdlet by using the pipe
operator. This cmdlet specifies an encryption algorithm for the volume or
volumes. This command also specifies a path to a recovery key and
indicates that these volumes use a recovery key as a key protector.
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?linkid=287652
Disable-BitLocker
Lock-BitLocker
Resume-BitLocker
Suspend-BitLocker
Unlock-BitLocker
Get-BitLockerVolume
31 | P a g e
Powershell Commandlet Reference: BITLOCKER
Enable-BitLockerAutoUnlock
SYNOPSIS
Enables automatic unlocking for a BitLocker volume.
SYNTAX
Enable-BitLockerAutoUnlock [-MountPoint] <String[]> [-Confirm] [-
WhatIf] [<CommonParameters>]
DESCRIPTION
The Enable-BitLockerAutoUnlock cmdlet enables automatic unlocking for
a volume protected by BitLocker Disk Encryption.
PARAMETERS
-MountPoint <String[]>
Specifies an array of drive letters or BitLocker volume objects.
The cmdlet enables automatic unlocking for the volumes specified. To
obtain a BitLocker volume object, use the Get-BitLockerVolume cmdlet.
Required? true
Position? 1
Default value
Accept pipeline input? True (ByValue, ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not
run.
Required? false
Position? named
32 | P a g e
Powershell Commandlet Reference: BITLOCKER
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
BitLockerVolume[], String[]
OUTPUTS
BitLockerVolume[]
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?linkid=287653
Clear-BitLockerAutoUnlock
Disable-BitLockerAutoUnlock
Get-BitLockerVolume
33 | P a g e
Powershell Commandlet Reference: BITLOCKER
Get-BitLockerVolume
SYNOPSIS
Gets information about volumes that BitLocker can protect.
SYNTAX
Get-BitLockerVolume [[-MountPoint] <String[]>] [<CommonParameters>]
DESCRIPTION
The Get-BitLockerVolume cmdlet gets information about volumes that
BitLocker Drive Encryption can protect. You can specify a BitLocker
volume by drive letter, followed by a colon (C:, E:). If you do not
specify a drive letter, this cmdlet gets all volumes for the current
computer.
You can use this cmdlet to get BitLocker volumes to use with other
cmdlets, such as the Enable-BitLocker cmdlet or the Add-
BitLockerKeyProtector cmdlet. You can also use this cmdlet to view the
following information about a BitLocker volume:
PARAMETERS
-MountPoint <String[]>
Specifies an array of drive letters. This cmdlet gets these
BitLocker volumes.
Required? false
Position? 1
Default value
Accept pipeline input? True (ByValue, ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
34 | P a g e
Powershell Commandlet Reference: BITLOCKER
INPUTS
BitLockerVolume[], String[]
OUTPUTS
BitLockerVolume[]
This command gets all the BitLocker volumes for the current computer.
35 | P a g e
Powershell Commandlet Reference: BITLOCKER
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?linkid=287654
Add-BitLockerKeyProtector
Enable-BitLocker
Enable-BitLockerAutoUnlock
36 | P a g e
Powershell Commandlet Reference: BITLOCKER
Lock-BitLocker
SYNOPSIS
Prevents access to encrypted data on a BitLocker volume.
SYNTAX
Lock-BitLocker [-MountPoint] <String[]> [-ForceDismount] [-Confirm]
[-WhatIf] [<CommonParameters>]
DESCRIPTION
The Lock-BitLocker cmdlet prevents access to all encrypted data on a
volume that uses BitLocker Drive Encryption. You can use the
Unlock-BitLocker cmdlet to restore access.
You can specify a volume to lock by drive letter, or you can specify
a BitLocker volume object. This cmdlet cannot lock a volume that hosts
the operating system. If you attempt to lock an already locked volume,
this cmdlet does nothing.
PARAMETERS
-ForceDismount [<SwitchParameter>]
Indicates that the cmdlet attempts to lock a drive even if the
drive is in use.
Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-MountPoint <String[]>
Specifies an array of drive letters or BitLocker volume objects.
The cmdlet attempts to lock the volumes specified. To obtain a BitLocker
volume object, use the Get-BitLockerVolume cmdlet.
Required? true
Position? 1
Default value
Accept pipeline input? True (ByValue, ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
37 | P a g e
Powershell Commandlet Reference: BITLOCKER
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not
run.
Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
BitLockerVolume[], String[]
OUTPUTS
BitLockerVolume[]
This command locks the BitLocker volume specified with the Mount
parameter. The command uses the ForceDismount parameter, so the cmdlet
attempts to lock the volume even if it is in use.
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?linkid=287655
Disable-BitLocker
Enable-BitLocker
Resume-BitLocker
Suspend-BitLocker
Unlock-BitLocker
Get-BitLockerVolume
38 | P a g e
Powershell Commandlet Reference: BITLOCKER
Remove-BitLockerKeyProtector
SYNOPSIS
Removes a key protector for a BitLocker volume.
SYNTAX
Remove-BitLockerKeyProtector [-MountPoint] <String[]> [-
KeyProtectorId] <String> [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Remove-BitLockerKeyProtector cmdlet removes a key protector for a
volume protected by BitLocker Drive Encryption.
PARAMETERS
-KeyProtectorId <String>
Specifies the ID for a key protector or a KeyProtector object. A
BitLocker volume object includes a KeyProtector object. You can specify
the key protector object itself, or you can specify the ID. See the
Examples section. To obtain a BitLocker volume object, use the
Get-BitLockerVolume cmdlet.
Required? true
Position? 2
Default value
Accept pipeline input? True (ByValue, ByPropertyName)
Accept wildcard characters? false
-MountPoint <String[]>
Specifies an array of drive letters or BitLocker volume objects.
The cmdlet removes key protectors for the volumes specified. To obtain a
BitLocker volume object, use the Get-BitLockerVolume cmdlet.
39 | P a g e
Powershell Commandlet Reference: BITLOCKER
Required? true
Position? 1
Default value
Accept pipeline input? True (ByValue, ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not
run.
Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
BitLockerVolume[], String[]
OUTPUTS
BitLockerVolume[]
40 | P a g e
Powershell Commandlet Reference: BITLOCKER
The second command removes the key protector for the BitLocker volume
specified by the MountPoint parameter. The command specifies the key
protector by using its ID, contained in the BitLocker object stored in
$BLV.
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?linkid=287656
Add-BitLockerKeyProtector
Backup-BitLockerKeyProtector
Get-BitLockerVolume
41 | P a g e
Powershell Commandlet Reference: BITLOCKER
Resume-BitLocker
SYNOPSIS
Restores Bitlocker encryption for the specified volume.
SYNTAX
Resume-BitLocker [-MountPoint] <String[]> [-Confirm] [-WhatIf]
[<CommonParameters>]
DESCRIPTION
The Resume-BitLocker cmdlet restores encryption on a volume that uses
BitLocker Drive Encryption. You can use the Suspend-BitLocker cmdlet to
allow users to access encrypted data temporarily. Data written to the
volume continues to be encrypted, but the key to unlock the operating
system volume is in the open.
PARAMETERS
-MountPoint <String[]>
Specifies an array of drive letters or BitLocker volume objects.
This cmdlet resumes protection for the volumes specified. To obtain a
BitLocker volume object, use theGet-BitLockerVolume cmdlet.
Required? true
Position? 1
Default value
Accept pipeline input? True (ByValue, ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not
run.
42 | P a g e
Powershell Commandlet Reference: BITLOCKER
Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
BitLockerVolume[], String[]
OUTPUTS
BitLockerVolume[]
This command gets all the BitLocker volumes for the current computer
by using the Get-BitLockerVolume cmdlet and passes them to Resume-
BitLocker by using the pipe operator. The command restores protection for
all BitLocker volumes.
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?linkid=287657
Disable-BitLocker
Enable-BitLocker
Lock-BitLocker
Suspend-BitLocker
Unlock-BitLocker
Get-BitLockerVolume
43 | P a g e
Powershell Commandlet Reference: BITLOCKER
Suspend-BitLocker
SYNOPSIS
Suspends Bitlocker encryption for the specified volume.
SYNTAX
Suspend-BitLocker [-MountPoint] <String[]> [[-RebootCount] <Int32>]
[-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Suspend-BitLocker cmdlet suspends Bitlocker encryption, allowing
users to access encrypted data on a volume that uses BitLocker Drive
Encryption. This cmdlet makes the encryption key available in the clear.
You can specify the number of times that a computer restarts before
the BitLocker suspension ends by using the RebootCount parameter, or you
can use the Resume-BitLocker cmdlet to manually resume protection. If you
do not specify the RebootCount parameter, the cmdlet uses a value of one
(1), so BitLocker protection resumes after the next restart.
PARAMETERS
-MountPoint <String[]>
Specifies an array of drive letters or BitLocker volume objects.
This cmdlet suspends protection for the volumes specified. To obtain a
BitLocker volume object, use the Get-BitLockerVolume cmdlet.
Required? true
Position? 1
Default value
Accept pipeline input? True (ByValue, ByPropertyName)
Accept wildcard characters? false
-RebootCount <Int32>
Specifies the number of computer restarts before BitLocker
restores protection. The acceptable values for this parameter
44 | P a g e
Powershell Commandlet Reference: BITLOCKER
Required? false
Position? 2
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not
run.
Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
BitLockerVolume[], String[]
OUTPUTS
BitLockerVolume[]
45 | P a g e
Powershell Commandlet Reference: BITLOCKER
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?linkid=287658
Disable-BitLocker
Enable-BitLocker
Lock-BitLocker
Resume-BitLocker
Unlock-BitLocker
Get-BitLockerVolume
46 | P a g e
Powershell Commandlet Reference: BITLOCKER
Unlock-BitLocker
SYNOPSIS
Restores access to data on a BitLocker volume.
SYNTAX
Unlock-BitLocker [-MountPoint] <String[]> -AdAccountOrGroup [-
Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Unlock-BitLocker cmdlet restores access to encrypted data on a
volume that uses BitLocker Drive Encryption. You can use the Lock-
BitLocker cmdlet to prevent access.
PARAMETERS
-AdAccountOrGroup [<SwitchParameter>]
Indicates that BitLocker requires account credentials to unlock
the volume. In order to use this parameter, the account for the current
user must be a key protector for the volume.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-MountPoint <String[]>
47 | P a g e
Powershell Commandlet Reference: BITLOCKER
Required? true
Position? 1
Default value
Accept pipeline input? True (ByValue, ByPropertyName)
Accept wildcard characters? false
-Password <SecureString>
Specifes a secure string that contains a password. The password
specified acts as a protector for the volume encryption key.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-RecoveryKeyPath <String>
Specifies the path to a recovery key. The key stored in the
specified path acts as a protector for the volume encryption.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-RecoveryPassword <String>
Specifies a recovery password. The password specified acts as a
protector for the volume encryption key.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not
run.
Required? false
48 | P a g e
Powershell Commandlet Reference: BITLOCKER
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer,
PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
BitLockerVolume[], String[]
OUTPUTS
BitLockerVolume[]
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?linkid=287659
Disable-BitLocker
Enable-BitLocker
Lock-BitLocker
Resume-BitLocker
Suspend-BitLocker
Get-BitLockerVolume
49 | P a g e