Diskpart is a command-line utility used to manipulate disk partitions in all versions of Windows and Windows Server beginning with Windows XP and Windows Server 2003. The utility adds capability to the Windows Disk Management snap-in.
Users can type Diskpart commands directly to configure storage, or script Diskpart to perform multiple commands via a text file script. Diskpart can be used to convert a basic disk to a dynamic disk, or vice versa – though you must delete any dynamic volumes before conversion.
Unlike many command-line utilities, Diskpart does not operate in a single-line mode; instead, Diskpart commands are read from standard input/output (I/O).