Diskpart is a manual utility with a command-line structure that allows users to alter a disk, drive, partition or volume. It is available with Windows Vista and Windows XP operating systems, as well as Windows 7 and some Windows NT OS versions. It replaces the fdisk utility on some older Windows operating systems.
Techopedia explains DiskPart
The syntax for DiskPart includes several key variables. The primary one is a variable for the disk or object of focus, or the object that the user wishes to act on using a command. Users can list all available disks using an initial command and then designate a focus. Other variables include size and offset.
In addition, DiskPart includes an error handling protocol that users can turn on or off as necessary. An error returns an error value integer from the program if a problem is encountered. Users can turn the error protocol off for commands where the program will work on many successive objects and complete a given task for each unless a problem is encountered.