How to Access and Use Diskpart Utility in Windows Server 2016?

Diskpart in Windows Server 2016 allows you to resize partition, convert disk to GPT and so on. Refer to this post to realize how to complete those operations with Diskpart.

Bryce

By Bryce / Updated on May 12, 2023

Share this: instagram reddit

Overview of Diskpart

Diskpart, a Windows built-in command-line utility, integrates most commands that you can use in Disk Management. It can work on a disk, partition, or volume. You can use it to deal with many issues about disk and partition, such as delete, extend, shrink partition, clean disk, convert disk to GPT, etc. through scripts or direct inputting commands in all versions of Windows OS since Windows 2000.

How to open Server 2016 Diskpart?

If you can enter Windows Server 2016 system normally, you can run Diskpart by pressing Windows + R at the same time, inputting “diskpart” and clicking OK. Or you can input diskpart in the Search box, right-click the item and choose Run as administrator.

When you encounter Windows Server 2016 boot errors, like inaccessible boot device and can’t boot into OS or you want to delete system partition, you can run Diskpart through the following steps:

Step 1. Insert the installation CD/DVD into your server and change boot order to boot from the installation media.

Step 2. When “Press any key to boot from CD or DVD” appears, press any key to continue.

Step 3. On the Windows Boot Manager, choose Windows Setup [EMS enabled] and press Enter key.

Step 4. On the installation screen, click Next. Then, click Repair your computer to access Choose an option Window.

Step 5. On Choose an option window, choose Troubleshoot.

Step 6. On Advanced options window, choose Command Prompt. Then, click Admin account to load Command Prompt.

Step 7. Type the password for the administrator account and click Continue to access Command Prompt interface.

Step 8. In Command Prompt window, input diskpart and hit Enter to launch Diskpart.

How to use Diskpart in Windows Server 2016? (four examples of common commands)?

After you can launch Diskpart utility in Server 2016, you can manage your disk and partitions conveniently. You should list and select an object to give it focus and then Diskpart commands can act on that object. You can type “help” and hit Enter to view all commands and parameters of Diskpart. Have a look at the main functions of diskpart listed below:

▪ Extend or shrink partition
▪ Delete / create partition
▪ Convert disk to GPT/MBR
▪ Format partition with NTFS, FAT32 or exFAT
▪ Initialize disk
▪ Change drive letter
▪ Mark partition as active

Next, some examples of most common Diskpart commands in Server 2016 will be listed.

✎ Notes:
◆ You need to hit Enter key after type every command.
◆ “n” refers to the disk number of the disk that holds the partition you want to manage; “m” is the partition number that you need to manage.

1. Extend Volume in Server 2016

▪ list disk
▪ select disk n
▪ list partition
▪ select partition m
▪ extend

If you want to add a specified size of unallocated space to partition, replace “extend” with “extend size=x”. x is the size in MB you want to add to the partition.

Limitations:

① To extend a partition in success, there should be a contiguous unallocated space behind the partition that you need to enlarge. Otherwise, you can get an error ----
②You can only extend NTFS formatted partition. If the partition is formatted with FAT32, you are not allowed to extend it.

2. Shrink volume in Server 2016

▪ list disk
▪ select disk n
▪ list partition
▪ select partition m
▪ shrink desired = y (“y” is the size in MB you want to shrink the partition by.)

Limitations:

① You can only shrink NTFS partitions, but it is not allowed to shrink FAT32.

② There are chances to meet shrink failure due to unmovable files, bad cluster or something else. To shrink partition, you need to take measures accordingly, which might be a little bit complicated.

3. Delete volume in Server 2016

▪ list disk
▪ select disk n
▪ list partition
▪ select partition m
▪ delete partition

4. Convert disk to gpt in Server 2016

▪ list disk
▪ select disk n
▪ convert gpt

Limitation: If your disk is not empty, you can’t convert a disk to GPT directly. You can erase all data on the disk via the “clean” command. To avoid data loss, you need to back up necessary files in advance and then you need to restore the files after converting.

A worth-trying alternative to Server 2016 Diskpart

In many cases, Diskpart can help you to solve problems about disk and partition. Due to the limitations aforementioned, have a look at a great alternative to Diskpart in Windows Server 2016, AOMEI Partition Assistant Server. It can overcome these limitations, allowing you to:

♥ Extend partition (system partition also supported) with non-contiguous unallocated space without losing data
Allocate free space from one partition to another
♥ Extend or shrink FAT32/FAT16 partition.
♥ Convert data/system disk from MBR to GPT without deleting any partition.

What’s more, it can do well in:

♥ Migrating OS to SSD
Cloning disk to disk
Recovering deleted partition
♥ Converting dynamic disk into basic without losing data
♥ …

Install and run AOMEI Partition Assistant Server on your machine. Then, let’s see how it works (two examples are demonstrated).

✍ Note: It's available to free download the demo version of AOMEI Partition Assistant Server to have a try!

Download Demo Server 2022, 2019, 2016, 2012, 2008
Secure Download

Extend Partition with a non-contiguous unallocated space in Windows Server 2016

Step 1. In the main interface, right-click the partition that you need to extend. choose “Advanced” and select “Merge Partition”.

Merge Partitions

Step 2. Check the box before Unallocated and click OK.

Tick Unallocated Space

Step 3. In the main interface, click Apply and Proceed to commit the operation.

Proceed

Convert MBR disk to GPT in Windows Server 2016

Step 1. In the home interface, right-click the MBR disk that you need to convert to GPT, choose Convert to GPT.

Convert 4tb To Gpt

Step 2. In the pop-up window, click OK to continue.

Ok 4tb Gpt

Step 3. Click Apply and Proceed to commit operation.

Apply 4tb Gpt

Notes:

▪ If you need to clone system MBR disk into GPT, make sure that your machine support EFI/UEFI boot in advance and you need to enter BIOS to change Legacy to UEFI boot mode.
▪ It is recommended to back up Windows Server 2016 and important information just in case of accidents caused by wrong operations.

Bryce
Bryce · Staff Editor
Bryce is an editor of AOMEI Technology, he covers backup & restore, hard disk & partitions management, cloud files transfer, website & database backup and so on for AOMEI. He enjoys helping people find solutions to their problems. He loves traveling, Sleeping, reserching and so on. He enjoys helping people find solutions to their problems. He loves traveling, Sleeping, reserching and so on. He would like to spend all time on reaserching computer problems. He is a very cute boy.