Windows OS includes built-in disk and partition management tools that let you perform a wide range of tasks, including extending partitions, splitting disks, and more. Extending partitions is particularly important after upgrading your Windows Server storage. In this guide, we'll show you how to extend a partition on your Windows Server.
First, connect to your Windows Server via RDP. If you need help, see our First Access (RDP) guide.
There are two ways to manage disks and partitions: the Disk Management tool with its GUI, and the diskpart command line. The Disk Management tool is a graphical interface for Diskpart and covers most standard tasks, including extending partitions. For advanced users, diskpart is the more powerful and comprehensive option.
There are several situations where you may need to extend an existing partition to use additional storage. A common example is upgrading your server's storage, which is only allocated by default after you extend the main partition.
After a storage upgrade in the Manage plan tab, on current Windows images the panel automatically extends drive C: by the additional storage at the next restart. You only need the steps below if C: is not larger afterward.
We recommend using the Disk Management tool, as it is much easier, especially for beginners. The process is safe and does not affect your data.
If you can't extend C: even though unallocated space is available, there is usually a recovery partition directly after C:. See the Recovery partition directly after C: section below for how to fix this.
First, open the Disk Management tool. Simply search for it in the Start menu, or open Run with Windows key + R, enter diskmgmt.msc, and confirm.
In the tool, right-click the main partition and select Extend Volume to open the wizard.
The main drive is always the C: drive.
In the wizard, click Next to go to a page where you can choose how much storage to add. By default, Windows automatically uses all unallocated space, which is ideal.
You can click Next and then Finish to complete the process.
Once complete, Disk Management will show the new configuration with the updated disk size.
First, open Command Prompt as an administrator. Search for it in the Windows Start menu, right-click it, and select Run as administrator.
Enter the diskpart command to start the CLI tool. Once it has loaded, enter list disk to display all currently connected disks.
Then, use select disk [Festplattennummer] to select the disk you want to extend. Replace [Festplattennummer] with the number shown in the list.
The main drive is always the C: drive.
With the disk selected, enter list volume to display all volumes on that disk. Find the volume you want to extend and select it with select volume [Volumenummer]. Replace [Volumenummer] with the corresponding number.
With the disk and volume selected, you can now extend the volume. You can either use all unallocated space or specify a particular size:
# Erweiterung auf gesamten nicht zugewiesenen Speicherplatz
extend
# Erweiterung auf eine bestimmte Größe (10240 = 10240MB = 10GB)
extend size=10240
If the process succeeds, the updated volume size will appear when you display the volumes again and in File Explorer. Enter quit to exit.
On older Windows Server images, there is a small recovery partition (usually 500 MB to 1 GB) directly after drive C:. The new unallocated space is located beyond it. However, Windows can only extend a volume into free space directly to its right. This means that neither the automatic extension at restart nor the Disk Management or diskpart methods will work in this case.
Here's how to identify this situation:
- In Disk Management, Extend Volume is grayed out for C:, even though unallocated space is available.
- A partition labeled Recovery partition appears between C: and the unallocated space.
extendin diskpart fails with an error message.
To extend C:, you need to move the recovery partition out of the way. It can only be moved using third-party partitioning software. An easier option is to remove it: first move the Windows Recovery Environment (WinRE) to drive C: so it remains available.
With ZapX Pass, open the ZapX AI Agent tab in your VPS web interface and describe the issue, for example: “I can't extend C: after the upgrade, and there's a recovery partition right after it.” If your VPS system connection is active, the agent will check your disk layout and guide you through the steps below.
Before proceeding, create a backup of your VPS in the Backups tab, or check that a recent daily backup is available there. If you accidentally select the wrong partition in diskpart, the data on it will be lost. Only delete the Recovery partition located directly after C:.
- Open Command Prompt as an administrator.
- Enter
reagentc /info. If the status is Enabled, disable WinRE withreagentc /disable. Windows will copy the recovery environment to drive C:. - Start
diskpartand display the disks withlist disk. Select the disk containing drive C: (usuallyselect disk 0) and display its partitions withlist partition. - Find the partition labeled Recovery that appears directly after the large C: partition. Select it with
select partition [Partitionsnummer]and usedetail partitionto confirm that it is the recovery partition. - Remove it with
delete partition override. Disk Management does not offer the option to delete this partition, so you can only do this with diskpart. - Select C: (
list volume, thenselect volume [Volumenummer]) and extend it withextend. Exit diskpart withquit. - Re-enable the recovery environment with
reagentc /enableand usereagentc /infoto check that the status is Enabled again.
Drive C: now uses all available storage.
