This script creates the disk partitions on the target computer by calling the Diskpart utility. The parameters used to configure the disk are specified by the Task Sequencer or in CustomSettings.ini. ZTIDiskpart.wsf is primarily run in New Computer scenarios. The process works like this:

1.   The MDT deployment process runs the ZTIDiskpart.wsf script based on the steps and sequence of steps in the Task Sequencer.

2.   ZTIDiskpart.wsf starts the Diskpart utility and sends it the required configuration commands.

3.   ZTIDiskpart.wsf runs Diskpart.exe and provides a .txt file as a command-line parameter.

4.   The disk is initially cleaned by sending Diskpart the CLEAN command.

5.   If this is the first disk and no disk configuration has been specified by the Task Sequencer or in CustomSettings.ini, a single partition is created to store the operating system. However, if a disk configuration has been specified, the disk will be configured according to the specified configuration.

6.   If BitLocker is to be enabled, space is reserved at the end of the first disk.

7.   All format commands are queued until after Diskpart has finished. If not explicitly specified by the Task Sequencer or in CustomSettings.ini, ZTIDiskpart.wsf performs a quick format of drive C using the following command: FORMAT C: /FS:NTFS /V:OSDisk /Q /Y.

8.   ZTIDiskpart.wsf copies the ZTIDiskpart_diskpart.log and BDD.log files from the RAM disk back to the hard drive.

Customize the disk configuration of the target computer by providing the required information in the Task Sequencer or in CustomSettings.ini.

For more information about configuring disks, see the MDT document Using the Microsoft Deployment Toolkit.

 

Value

Description

Input

Environment variables. Contains the property values, custom property values, database connections, deployment rules, and other information that the scripts require to complete the deployment process

Output

·     ZTIDiskpart.log. Log file that contains events that this script generates

·     BDD.log. Log file that contains events that all MDT scripts generate

References

·     Diskpart.exe. Utility that allows for the automated management of disks, partitions, and volumes

·     Format.com. Formats the hard disk

·     ZTIDiskUtility.vbs. Includes support functions and subroutines that the script uses

·     ZTIUtility.vbs. Includes support functions and subroutines that the script uses

Location

distribution\Scripts

Use

cscript ZTIDiskpart.wsf </debug:value>

 

Arguments

Value

Description

/debug:value

Outputs the event messages to the console and to the .log files. If the value specified in value is:

·     TRUE, event messages are sent to the console and the .log files

·     FALSE, event messages are sent only to the .log files (This is the behavior when the argument is not provided.)

 

Properties

Name

Read

Write

BDEDriveLetter

˜

 

BDEDriveSize

˜

 

BDEInstall

˜

 

DeployDrive

˜

 

DeploymentType

˜

 

DestinationDisk

˜

 

DestinationLogicalDrive

 

˜

DoNotCreateExtraPartition

˜

 

ImageBuild

˜

 

OSDDiskIndex

˜

 

OSDDiskpartBiosCompatibilityMode

˜

˜

OSDDiskType

˜

 

OSDPartitions

˜

 

OSDPartitionStyle

˜

 

SMSTSLocalDataDrive

 

˜

VolumeLetterVariable

˜

 

 

Related Topics

Scripts