Diskpart is a scriptable Windows command-line tool which allows management of disk volumes including partitions and virtual disk (VHD/VHDX) files.
The Diskpart command allows command-line management of disk volumes including partitions and virtual disk (VHD/VHDX) files, both interactively and in a scripted fashion.
More information on the use of Diskpart can be found at http://support.microsoft.com/kb/300415.