windows:misc:diskpart

Using DiskPart to initialize a new disk on Windows Server Core

If you have added a new disk to Windows Server Core, there are only two ways to initialize the disk. Through Computer management snap-in in the MMC, or using DiskPart in the console. Using the console, run DiskPart and execute the following commands:

C:\>diskpart

Microsoft DiskPart version 6.3.9600

Copyright (C) 1999-2013 Microsoft Corporation.
On computer: VMH05

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Offline         931 GB   931 GB
  Disk 1    Online          136 GB      0 B
  Disk 2    Online          341 GB      0 B

DISKPART> select disk 0

Disk 0 is now the selected disk.

DISKPART> disk online

DiskPart successfully onlined the selected disk.

DISKPART> attributes clear readonly

Disk attributes cleared successfully.

DISKPART> attributes disk
Current Read-only State : No
Read-only  : No
Boot Disk  : No
Pagefile Disk  : No
Hibernation File Disk  : No
Crashdump Disk  : No
Clustered Disk  : No

DISKPART> create partition primary

DiskPart succeeded in creating the specified partition.

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
* Disk 0    Online          931 GB      0 B
  Disk 1    Online          136 GB      0 B
  Disk 2    Online          341 GB      0 B

DISKPART> format

  100 percent completed

DiskPart successfully formatted the volume.

DISKPART> exit

Disk is online, not read only, has a partition occupying whole disk, the partition has the first available drive letter and is formatted. And you're done!

  • windows/misc/diskpart.txt
  • Last modified: 2019/10/31 09:06
  • by 127.0.0.1