Written by 10:56 pm Microsoft, Windows, Windows Server

Cheatsheet: Using Diskpart on a Server Core installation #4

Using Diskpart on a Server Core installation. Disk Administration or Partition a disk.

Create a new partition and format a partition

SELECT DISK 0
CREATE PARTITION PRIMARY
ASSIGN LETTER=E
SELECT PARTITION 1
FORMAT FS=NTFS LABEL="New Volume" QUICK
EXIT

Commands you may then issue at the DISKPART prompt:

LIST Disk
LIST Partition
LIST Volume

SELECT Disk n
SELECT Volume n
SELECT Partition n

DETAIL Disk
DETAIL Partition
DETAIL volume

HELP
REM (remark/comment)
EXIT

Commands to Manage Basic Disks:

(set the current in-focus partition to be the system partition)

ASSIGN (allocate the next free drive letter)
ASSIGN LETTER=l (Choose a free letter)

CREATE PARTITION Primary Size=50000 (50 GB)
CREATE PARTITION Extended Size=25000
CREATE PARTITION logical Size=25000

DELETE Partition

EXTEND Size=10000

REMOVE letter=l (Remove drive letter l from the in-focus partition)
REMOVE /ALL (Remove ALL current drive letters and mount points)

Commands to Manage Dynamic Disks:

(set the current in-focus partition to be the system partition)

ASSIGN (allocate the next free drive letter)
ASSIGN LETTER=l (Choose a free letter)

ADD disk=n (Add a mirror to the in-focus SIMPLE volume on the specified disk.)

BREAK disk=n (Break the current in-focus mirror)

CREATE VOLUME Simple Size=n Disk=n
CREATE VOLUME Stripe Size=n Disk=n,n,...
CREATE VOLUME Raid Size=n Disk=n,n,...

DELETE DISK
DELETE PARTITION
DELETE VOLUME

EXTEND disk=n [Size=n]
IMPORT
ONLINE

REMOVE letter=l (Remove drive letter l from the in-focus volume)
REMOVE /ALL (Remove ALL current drive letters and mount points)
RETAIN

Commands to Convert Disks:

CONVERT mbr
CONVERT gpt
CONVERT dynamic
CONVERT basic

CLEAN ALL (remove all partition and volume info from the hard drive)
RESCAN

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , Last modified: September 2, 2019
Close Search Window
Close