Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Windows 11 / Extending a Disk Volume (Partition) in Windows

August 10, 2023 PowerShellWindows 10Windows 11Windows Server 2016Windows Server 2019

Extending a Disk Volume (Partition) in Windows

Modern versions of Windows and Windows Server allow you to increase the size of any disk volume (partition) at the expense of unused (unallocated) disk space without shutting down the computer and without losing data. In this article, we’re going to explain how to extend a disk partition in Windows using the Disk Management GUI, the diskpart tool, or PowerShell commands.

Windows will allow you to expand a basic volume if:

  • Free unallocated space available on the same physical (virtual disk);
  • The partition is formatted with the NTFS or ReFS file system;
  • There is free (unpartitioned) space to the right of the partition you want to extend;
  • You cannot create a partition larger than 2 TB on disks with an MBR partition table. For large disks (over 2 GB), use a GPT partition table (you can convert MBR to GPT in Windows without data loss)

Contents:
  • How to Extend a Volume Using the Disk Management Snap-in
  • Extending a Volume in Windows from the Command Line

You must first increase the virtual hard disk size in the virtual machine properties if you are running Windows in a VM. Please refer to the instructions for extending virtual disks in VMware and in Hyper-V.

How to Extend a Volume Using the Disk Management Snap-in

The easiest way to extend a partition in Windows is to use the Disk Management MMC:

  1. Open the Disk Management console (diskmgmt.msc) as an administrator. Update volume information using the option Action -> Rescan disk (if you have recently increased the size of your virtual machine’s hard disk in the hypervisor and can’t see the newly added space); rescan disks windows
  2. Right-click on the disk volume you want to extend. In my case, it’s a logical partition with a C:\ drive letter assigned to it;
  3. Select Extend Volume; Extend Volume with Windows Disk Management
  4. Maximum available space in MB indicates how much more you can extend the current partition. Type the amount of MB to be added to the partition using unallocated space in the Select the amount of space in MB box. In this example, I’m going to add all the free space to my system volume; Extend volume size in Windows
  5. Click Next -> Finish and check that your C drive has been extended. Check new drive size

The screenshot below shows that there is a Windows Recovery Environment volume between your C drive and the unallocated area. Note that the Extend Volume option for the disk is greyed out.

Extend Volume option is grayed out in Windows

This means that you will not be able to expand your C: drive until you remove the Recovery partition or move it to the end of the drive. See how to do this in the following guide: Cannot Extend Volume to Unallocated Space in Windows.

Extending a Volume in Windows from the Command Line

If you need to increase the disk volume size from the command prompt, you can use the console diskpart tool or PowerShell cmdlets to manage disks and partitions from the built-in Storage module. Further in the article, we will show how to increase disk size on a host running Windows Server Core or Microsoft Hyper-V Server (non-GUI).

Run the command:

Diskpart

Here’s how to view the list of available disks:

DISKPART -> list disk

Select a disk:

DISKPART -> select disk 0

List volumes:

DISKPART -> list vol

Select the one you want to extend:

DISKPART -> select volume 3

The following diskpart options are used to expand a disk volume:

EXTEND [SIZE=] [DISK=] [NOERR]

For example, you can add 10 GB to a current volume:

DISKPART -> extend size=10000

Or add all available free space:

DISKPART -> extend

Don’t forget to check that the volume has been increased:

DISKPART -> list vol

Close the diskpart session:

DISKPART -> exit

How to extend a disk in Windows using diskpart

You can also extend the volume using PowerShell.

Start by updating the information about your disks:

"rescan" | diskpart

Display information about the current size of the partitions on disc 0:

Get-Partition -DiskNumber 0

PowerShell: get partition size

The command below will give you the minimum size of your logical drive (SizeMin, which is the actual size of the data on the partition) and the maximum size of the partition it can be extended to (SizeMax):

Get-PartitionSupportedSize -DriveLetter C

Get-PartitionSupportedSize

To increase the specific volume (assigned drive letter), specify its new size:

Resize-Partition -DriveLetter C -Size 42169532416

If you want to extend it using all the free space available, use the following commands:

size = (Get-PartitionSupportedSize -DiskNumber 0 -PartitionNumber 3)
Resize-Partition -DiskNumber 0 -PartitionNumber 3 -Size $size.SizeMax

PowerShell: Resize-Partition

Finally, check that your partition has actually been extended:

Get-Partition -DiskNumber 0 -PartitionNumber 3

new partition size in Windows

Please note that Windows XP and Windows Server 2003 don’t support the online extension of the C: system partition. To expand the system partition without rebooting these operating systems, you can use Dell’s ExtPart tool.

0 comment
2
Facebook Twitter Google + Pinterest
previous post
How to Find Driver for Unknown Device in Windows
next post
Monitoring Domain Name Expiration Date with Zabbix

Related Reading

Zabbix: How to Get Data from PowerShell Scripts

October 27, 2023

Tracking Printer Usage with Windows Event Viewer Logs

October 19, 2023

PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

October 15, 2023

How to Query and Change Teams User Presence...

October 8, 2023

How to Use Ansible to Manage Windows Machines

September 25, 2023

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Zabbix: How to Get Data from PowerShell Scripts

    October 27, 2023
  • Tracking Printer Usage with Windows Event Viewer Logs

    October 19, 2023
  • PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

    October 15, 2023
  • Reset Root Password in VMware ESXi

    October 12, 2023
  • How to Query and Change Teams User Presence Status with PowerShell

    October 8, 2023
  • How to Increase Size of Disk Partition in Ubuntu

    October 5, 2023
  • How to Use Ansible to Manage Windows Machines

    September 25, 2023
  • Installing Language Pack in Windows 10/11 with PowerShell

    September 15, 2023
  • Configure Email Forwarding for Mailbox on Exchange Server/Microsoft 365

    September 14, 2023
  • How to View and Change BIOS (UEFI) Settings with PowerShell

    September 13, 2023

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • Fix: Remote Desktop Licensing Mode is not Configured
  • Manage Windows Updates with PSWindowsUpdate PowerShell Module
  • Configuring Port Forwarding in Windows
  • How to Install Remote Server Administration Tools (RSAT) on Windows
  • Start Menu or Taskbar Search Not Working in Windows 10/11
  • How to Delete Old User Profiles in Windows
  • Adding Drivers into VMWare ESXi Installation Image
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top