Windows Server Core – Create a new disk using diskpart
If you are using Microsoft Server 2016 you will notice that it is now in the server core setup.
If you have experience of using Server Core then you should be fine, but if you have not, it can be a little daunting. Is the simple process of adding a new virtual hard disk completely unknown without the use of a GUI to you? Well, you can use the commands below to help you add a new virtual disk.
When you have booted into Server Core you should be presented with a Command Prompt box where you can enter your commands. In this box, type the following commands:
- diskpart – this will load the diskpart program to create the virtual disk
- list disk – this will present to you the disks that the server can currently see
- rescan – run this command if your server cannot yet see the new virtual disk, run list disk after to check that the server can now see the new disk
- sel disk 1 – 1 being the number that has been allocated to the new disk (should be 1, 2 or 3 etc depending on how many disks you have attached to the server)
- create part prim – this will create a primary partition on the selected disk
- assign letter=E – E being the letter you want to allocate to this disk (you can change this to any available drive letter)
- sel part 1 – this will now select the partition that you created
- format fs=ntfs label=”DATA” quick (you can change “DATA” to whatever you want to label your new disk)
- exit – this will close the diskpart program
You can now go into the drive letter that you assigned and you should now see the new virtual disk available to you.
If you have any questions or feedback on this guide, please feel free to leave us a message below in the comments section.