BdeHdCfg.exe Parameter Reference
Applies To: Windows 7, Windows Server 2008 R2
The BitLocker Drive Preparation Tool (BdeHdCfg.exe) is used to prepare a hard drive with the partitions necessary for BitLocker Drive Encryption. Most installations of Windows 7 will not need to use this tool because BitLocker setup includes the ability to prepare and repartition drives as required.
Warning
There is a known conflict with the Deny write access to fixed drives not protected by BitLocker Group Policy setting located in Computer Configuration\Administrative Templates\Windows Components\BitLocker Drive Encryption\Fixed Data Drives.
If BdeHdCfg is run on a computer when this policy setting is enabled, you may encounter the following issues:
- If you attempted to shrink the drive and create the system drive, the drive size will be successfully reduced and a raw partition will be created. However, the raw partition will not be formatted. The following error message is displayed: "The new active Drive cannot be formatted. You may need to manually prepare your drive for BitLocker."
- If you attempted to use unallocated space to create the system drive, a raw partition will be created. However, the raw partition will not be formatted. The following error message is displayed: "The new active Drive cannot be formatted. You may need to manually prepare your drive for BitLocker."
- If you attempted to merge an existing drive into the system drive, the tool will fail to copy the required boot file onto the target drive to create the system drive. The following error message is displayed: "BitLocker setup failed to copy boot files. You may need to manually prepare your drive for BitLocker."
The following BdeHdCfg.exe parameters are included in this reference:
-driveinfo
-target
-newdriveletter
-size
-quiet
-restart
-driveinfo
This command is informational only.
Syntax
BdeHdCfg -driveinfo [DriveLetter]
Parameters
DriveLetter |
Represents a drive letter followed by a colon. |
Remarks
This command displays the drive letter, the total size, the maximum free space, and the partition characteristics. Only valid partitions are listed. Unallocated space is not listed if four primary or extended partitions already exist.
Example
BdeHdCfg -driveinfo C:
-target
This command is required to prepare a system drive for use by BitLocker and Windows Recovery by using this tool. By default, this partition is created without a drive letter.
Syntax
BdeHdCfg -target [default] [unallocated] [DriveLetter shrink] [DriveLetter merge]
Parameters
default |
Indicates that the command-line tool will follow the same process as the BitLocker setup wizard. |
unallocated |
Creates the system partition out of the unallocated space available on the disk. |
DriveLetter shrink |
Reduces the drive specified by the amount necessary to create an active system partition. To use this command, the drive specified must have at least 5 percent free space. |
DriveLetter merge |
Uses the drive specified as the active system partition. The operating system drive cannot be a target for merge. |
Remarks
This command allows you to determine which portion of a drive to use as the system drive and make that partition active.
Example
BdeHdCfg -target default
-newdriveletter
Syntax
BdeHdCfg -target [default] [unallocated] [DriveLetter shrink] [DriveLetter merge] -newdriveletter [DriveLetter]
Parameters
DriveLetter |
Represents a drive letter followed by a colon. |
Remarks
This command allows you to assign a new drive letter to the portion of a drive used as the system drive. However, it is recommended that you do not use a drive letter with your system drive.
Example
BdeHdCfg -target default -newdriveletter P:
-size
Syntax
BdeHdCfg -target [default] [unallocated] [DriveLetter shrink] -size [SizeinMegabytes]
Parameters
SizeinMegabytes |
Indicates the number of megabytes (MB) to use for the new partition. |
Remarks
This command allows you to specify the size of the system partition when a new system drive is being created. If you do not specify a size, the tool will use the default value of 300 MB. The minimum size of the system drive is 100 MB. If you will store system recovery or other system tools on the system partition, you should increase the size accordingly.
Warning
The -size command cannot be combined with the -target DriveLetter merge
Example
BdeHdCfg -target default -size 500
-quiet
Syntax
BdeHdCfg -target [default] [unallocated] [DriveLetter shrink] [DriveLetter merge] -quiet
Remarks
This command indicates that all actions and errors will not be displayed in the command-line interface. If any Yes/No (Y/N) prompts would have been displayed during the drive preparation, a "Yes" answer is assumed. To view any error that occurred during drive preparation, review the system event log under the Microsoft-Windows-BitLocker-DrivePreparationTool event provider.
Example
BdeHdCfg -target default -quiet
-restart
Syntax
BdeHdCfg -target [default] [unallocated] [DriveLetter shrink] [DriveLetter merge] -restart
Remarks
This command indicates that the computer should be restarted after the drive preparation has concluded. If other users are logged on to the computer and the -quiet option is not specified, a prompt will be displayed to confirm that the computer should be restarted.
Example
BdeHdCfg -target default -restart