How To Resize Partition Using Powershell or Partition Manager

Summary

Want to better manage the partition without data loss? This article is about how to resize partition powershell partition manage freeware.

Andrew Wright

Updated on 2024/11/02

by Andrew Wright

Running out of space on a partition can disrupt your system. Fortunately, PowerShell provides a powerful way to resize partitions, and for more user-friendly handling, you can use IM-Magic Partition Resizer. This guide walks you through both methods.

How to Resize Partition with PowerShell

PowerShell offers various commands to manage and resize partitions. Below are detailed guides for common scenarios:

Example: Resizing a Partition with PowerShell

To resize a partition with PowerShell:

  1. Open PowerShell as Administrator by searching for "PowerShell" in the Start menu, right-clicking, and selecting Run as Administrator.
  2. Enter diskpart and press Enter.
  3. Use the command list volume to identify the partition you wish to resize.
  4. Select the volume using Select Volume # (replace # with the volume number).
  5. Resize it by typing extend size=xxxx (replace xxxx with the size in MB).
  6. Type exit to close DiskPart and PowerShell.

For a more detailed explanation, visit this guide.

Shrinking a Partition with PowerShell

You can shrink a partition to free up space:

  1. Follow steps 1–4 from the example above to select the partition you wish to shrink.
  2. Type shrink desired=xxxx, replacing xxxx with the amount of space in MB to remove.
  3. Type exit to leave DiskPart and save the changes.

Visit this page for a detailed guide on shrinking partitions.

Extending a Partition to Maximum Size

To extend a partition to its maximum possible size:

  1. Use list volume and Select Volume # to identify the partition.
  2. Type extend without specifying a size to use all available unallocated space.
  3. Type exit to leave DiskPart and PowerShell.

Troubleshooting Unsupported Resize Errors

If you encounter "size not supported" errors, it might be due to insufficient unallocated space or limitations of the file system. Here’s how to handle it:

  • Ensure there is unallocated space adjacent to the partition you wish to resize.
  • Check that the partition uses a compatible file system, such as NTFS.
  • Use third-party tools like IM-Magic Partition Resizer for complex scenarios.

Refer to this troubleshooting guide for more help.

Resizing a Partition Remotely

To resize a partition on a remote machine:

  1. Ensure PowerShell Remoting is enabled on the target machine.
  2. Use Invoke-Command to execute the resize commands. For example:
  3. Invoke-Command -ComputerName "TargetMachine" -ScriptBlock {
        diskpart
        list volume
        select volume #
        extend size=xxxx
        exit
    }
        
  4. For advanced scenarios, consider using Invoke-Expression.

Resize Partition Using IM-Magic Partition Resizer

For Windows 11/10/8/7 => Download Partition Resizer Free [100% Free]

For Windows Server 2022-2003 => Download Partition Resizer Server [Free Demo]

For a simpler and safer method to resize partitions, use IM-Magic Partition Resizer:

  1. Download and install the application from here.
  2. Launch the app, right-click the partition to resize, and select "Resize/Move."
  3. Adjust the slider to create unallocated space or extend the partition.
  4. Click Apply to finalize changes.

Steps to shrink a partitionShrinking a partition in Windows

Steps to extend a partitionExtending a partition in Windows

IM-Magic Partition Resizer offers a user-friendly way to handle partition resizing without the risks of manual commands.

Related Product