Diskpart is a command line which deals with disks, partitions or volumes by taking
advantage of scripts, remote session or directly inputting orders. Diskpart is
exactly the potential utility which augments the Disk Administrator graphical user
interface and enables a superset of the actions which are supported by the Disk
Before you can use diskpart commands on a disk, partition, or
volume, you must firstly list and then select the object to give it focus. When an
object has focus, any Diskpart commands that you type can act on that object.
How to extend Server disk partition with diskpart
To extend partition in Windows Server with Diskpart utility, you can refer to the steps given below:
Step1. Click start and type "diskpart" in the column, then press Enter on
Step2. Type "list volume" and press Enter on the keyboard to display the
existing volumes on the computer.
Step3. Type "select volume Y" and press Enter on the keyboard to focus on
volume Y; Y is the number or drive letter of the partition that you want to
Step4. Type "extend [size=n] [disk=n] [noerr]".
Contents in the square brackets are unnecessary. That is to say, you can only
type "extend" to extend the size of the selected volume.
"size=n " specifies the space, in megabytes (MB), to add to the current
partition. If you do not specify a size, the disk is extended to use all the
next contiguous unallocated space.
"disk=n " determines the dynamic disk on which to extend the volume. Space equal
to n is allocated on the disk. If no disk is specified, the volume is extended
on the current disk.
"noerr" is for scripting only. When an error is thrown, this parameter specifies
that Diskpart continue to process commands as if the error did not occur.
Without the noerr parameter, an error causes Diskpart to exit with an error
If there is no unallocated space behind partition Y, you cannot extend it. In
order to extend it, you must make some unallocated space and put it behind
Now, Partition Y has been extended with the unallocated space successfully.
An easier way to extend partition in Windows Server
There is no doubt that Diskpart is very useful in extending Server disk partition. But what if you are unfamiliar with command lines? What if there is no contiguous unallocated space behind the partition that you are going to extend?
If so, you can employ an overall and safe GUI partition tool for Windows Server – AOMEI Partition Assistant Server. It is very easy to use and has a great popularity among users all around the world with its supporting Windows Server 2003, 2008, 2012 R2, 2016, 2019. With it, you can extend system partition (C drive) or data partition flexibly and easily with Resize Partition, Merge Partitions and Allocate Free Space features.
Take a look at how it extends partition using Merge Partitions function (Supposed that there is an unallocated space on the disk).
Step 1. Install and fire up AOMEI Partition Assistant Server. Right click the partition that you want to merge and choose Merge Partitions.
Step 2. Tick the unallocated space and click OK.
Step 3. It will go back to the main interface. You can click Apply and Proceed to commit operation.
Except for extending partition, AOMEI Partition Assistant can help you a lot in other aspects. Its Disk Copy Wizard is able to clone hard drive to SSD or HDD in Windows Server, saving the time of reinstalling operating system and applications; its Partition Recovery Wizard is capable of recover lost or deleted partition in Windows Server.