VPS 2 min read

How to Extend the Disk on a Windows VPS

Truobox

Truobox

April 14, 2026

If you upgraded your VPS disk from the control panel but Windows still reports the old size, you need to extend the partition from inside the operating system. This guide walks you through doing it with PowerShell in just a few steps.

Step 1: Check how many partitions you have

First, find out how many partitions live on your disk. Open PowerShell as administrator and run:

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

This prints a table with your partition details: disk number, partition number, drive letter, size, and type.

Step 2: Remove partitions if needed

If you see more than 2 partitions and want to delete one of them (say, partition number 4 on disk number 0), use this command:

Remove-Partition -DiskNumber 0 -PartitionNumber 4 -Confirm:$false

This deletes the specified partition without asking for confirmation.

Important: Make sure the partition you’re about to delete holds no data you need. Take a backup before you proceed.

Step 3: Resize the main partition

To grow the main partition (for example, drive C:), you first need its maximum supported size. Then use the following commands to resize it:

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

Together, these commands expand partition C to the largest size the disk allows.

Additional notes

  • Administrator permissions: Make sure you run PowerShell as administrator, or these commands won’t work.
  • Backups: Back up your data before deleting or resizing partitions to avoid losing anything.
  • The pipe character (|): If you need to type a pipe in PowerShell and your keyboard makes it awkward, press Alt + 124 on the numeric keypad.

Follow these steps and you’ll manage your VPS partitions effectively and get the most out of your available disk space.