How to Extend the Disk on Windows (VPS)

CloudingHost Corp CloudingHost Corp June 15, 2026 2 min read

If you have expanded your VPS disk from the control panel but Windows still shows the old size, you need to extend the partition from the operating system. In this guide we explain how to do it using PowerShell in just a few steps.

Step 1: Check the number of partitions

Open PowerShell as administrator and run the following command to list every disk partition in a table, showing the disk number, partition number, drive letter, size and type.

Get-Disk | Get-Partition | Format-Table DiskNumber, PartitionNumber, DriveLetter, Size, Type

Step 2: Remove partitions if needed

If there is a recovery partition at the end of the disk that prevents you from extending the main drive, remove it. The following command deletes the specified partition (for example, partition 4 on disk 0) without asking for confirmation.

Remove-Partition -DiskNumber 0 -PartitionNumber 4 -Confirm:$false
Important: Make sure the partition you are about to delete does not contain any needed data. Back up your data before proceeding.

Step 3: Resize the main partition

Finally, extend the C: drive to its maximum available size. The first command gets the maximum supported size and the second resizes the partition to that value.

$s = Get-PartitionSupportedSize -DriveLetter C
Resize-Partition -DriveLetter C -Size $s.SizeMax

By following these steps, you will be able to manage your VPS partitions effectively and maximize the use of the available disk space.

Back to all tutorials