Windows 11/10/8/7: How to Shrink Volume Using Diskpart Command Line?
Learn how to use DiskPart to shrink volume from in command line prompt with the syntax in Windows 11/10/8/7. But sometimes, it may tell you there is an error. Fortunately, AOMEI Partition Assistant can fix it.
Why do you want to shrink volume?
The computer doesn’t have a perfect disk partitioning when it starts to be used. The sizes of all partitions will not be accepted over time, even they are perfect in the beginning. Thus, you have to resize it till you are satisfied. Some of them, you want to extend because they are not big enough, while some of them, you would like to shrink to get good performance.
Sometimes, you need to shrink the partition for creating a new one to store your personal files. Or you may want to shrink one partition to extend another one. Yes, you could shrink a partition in order to get a better use of the whole space.
How to shrink a volume?
To shrink volume, there are many methods. You can use Windows Disk Management to get interface performance, or use DiskPart to shrink volume in the command prompt with syntax. But how to shrink volume with CMD?
DiskPart
To use DiskPart, you need to open the command line prompt first. Click Start, type “cmd” to find the cmd program, right click it and select “Run as Administrator”, or press “WIN+R”, type “cmd” and press Enter. Type “diskpart” to open the DiskPart command prompt.
Then, you can type the syntax to shrink volume, as the following steps.
1. Type: list volume. You should remember the number of the volume you want to shrink.
2. Then, type select volume n to select the volume you want to shrink.
3. Type shrink desired=size to shrink the selected volume. And you will shrink volume successfully with DiskPart.
However, you may be warned by a shrink error, which means you may meet some trouble when you shrink volume.
There may be some unmovable files like the page files or the shadow copy storage areas, which are not automatically relocated and you cannot decrease the allocated space beyond the point where the unmovable files are. So, you can only shrink the partition to the unmovable file point. If you need to shrink more space, you need to move the unmovable files to another disk or delete it. If there are a number of bad clusters detected, you cannot shrink the partition either. Besides, DiskPart can only shrink/extend volume in NTFS file system, and so, if your file system is FAT, the DiskPart shrink cannot use.
Fortunately, AOMEI Partition Assistant 6.6 Edition can replace DiskPart to shrink volume more easily, and it can overcome all the trouble we mentioned above.
Alternative to DiskPart - AOMEI Partition Assistant
You can take advantage of the freeware AOMEI Partition Assistant Standard, which can help you shrink volume/partition to the minimum size without the obstruction of the unmovable file with an intuitive GUI. And it supports resizing encrypted partition as well. You can operate with mouse-clicking. And, it is totally free. Here you can follow the guidance below:
Step 1. Free download this software, install it to your computer in Windows 11/10/8/7, and launch it. Right-click the drive you need to shrink and then choose “Resize/Move Partition”.
Step 2. Then, you can shrink volume/partition by dragging the bar or remount the volume. Click OK.
Step 3. Step 3. Here you can see the pending operations and if there is no problem, click Apply to submit the task.
If you prefer to use command line to shrink volume, you can upgrade to AOMEI Partition Assistant Professional on your Windows PC. It supports more advanced features than AOMEI Partition Assistant Standard, including app migration, Command Line and free space allocation. Here you can learn how to shrink volume with command line of AOMEI Partition Assistant.
1. To use AOMEI partassist.exe, you need to run cmd as administrator. Then, type cd C:\Program Files \AOMEI Partition Assistant Pro Edition 6.6 (cd+ installation directory of AOMEI Partition Assistant), press Enter. Then, type partassist.exe /list and press Enter.
It will turn to AOMEI Partition Assistant command line and list all disk on your computer.
2. Type partassist.exe /list:1 and press Enter. It will choose the disk 1 and list all volumes on the selected disk.
3. Here you can type the command partassist.exe /hd:1 /resize:0 /reduce-left:10240 in the following screenshot, press Enter.
*You can adjust the parameters to make another shrink. For example, if you would like to shrink the specified partition to create an unallocated space on its right side, use “right” to replace “left”.
4. It will move and resize partition at the following window. When the progress reaches 100%, type exit to quit the program.
Notes:
● "/hd" followed by disk number, which starts with 0.
●"/resize" followed by partition number or drive letter, and the partition number starts with 0. If the specified value is drive letter, disk number can be ignored.
● By default, the specified size is in MB, and GB is also available.
Besides, you can use command line to extend partition too. With the command line, you can resize your partition in a simple syntax.
Conclusion
How to shrink volumes with DiskPart command lines? In this post, you’ve learnt the way to use the Windows inbuilt utility DiskPart to shrink volumes correctly. However, as mentioned above, DiskPart has some limits and in this case, another more powerful alternative AOMEI Partition Assistant is introduced to help you get it done more quickly and easily. Meanwhile, this software also contains 2 features for the volume shrink – “Resize Partition” and command lines. Which one to choose? It depends on you.