Edit

Share via


Lock-BitLocker

Prevents access to encrypted data on a BitLocker volume.

Syntax

Default (Default)

Lock-BitLocker
    [-MountPoint] <String[]>
    [-ForceDismount]
    [-WhatIf]
    [-Confirm]
    [<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.

For an overview of BitLocker, see BitLocker Drive Encryption Overview on TechNet.

Examples

Example 1: Lock a volume

PS C:\> Lock-BitLocker -MountPoint "E:" -ForceDismount

This command locks the BitLocker volume specified with the MountPoint parameter. The command uses the ForceDismount parameter, so the cmdlet attempts to lock the volume even if it is in use.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ForceDismount

Indicates that the cmdlet attempts to lock a drive even if the drive is in use.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:fd

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MountPoint

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.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

BitLockerVolume

Outputs

BitLockerVolume