Forum Discussion
How do you extend partition with unallocated space in Windows 10
If you prefer to use the command line to extend the NTFS-formatted D drive partition in Windows 10, here is a method I actually tried, which is relatively direct and effective. Try to extend windows partition with unallocated space as following steps:
Open the Command Prompt
I first typed "cmd" in the search box, then right-clicked "Command Prompt" and selected "Run as Administrator".
Start the Diskpart tool
Type diskpart in the command prompt and press Enter to enter the Diskpart environment.
diskpart
Select the disk
Type list disk to display all disks. I found that the D drive was on "Disk 1", so I typed:
select disk 1
Then press Enter to select the target disk.
Select the partition
Type list partition to list all partitions. Find the partition corresponding to the D drive, then type:
select partition X
Where X is the partition number of the D drive, press Enter.Type the command:
extend
If there is no unallocated space next to the D drive, I can compress other partitions to free up space. For example, select an adjacent partition:
select partition Y shrink desired=5000
Then press Enter, which will use the unallocated space to extend the D drive. If there is enough unallocated space, extend partition in Windows 10 will succeed.
Through these two command line methods, I successfully extended the partition using extend partition in Windows 10 and command line commands without third-party tools.
Although the Diskpart command line operation is efficient and does not require additional third-party tools, its operability and security are relatively low and it is suitable for users with certain experience. If you are not familiar with the command, it is recommended to use a more intuitive tool.