Server 2012 Core (no GUI) - How to manage disks?

36,306

You probably want to use the diskpart.exe tool.

c:\diskpart

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online           60 GB     0 B
  Disk 1    Online          200 GB   200 GB

DISKPART> select disk 1

Disk 1 is now the selected disk.

DISKPART> create partition primary

DISKPART> list partition

DISKPART> select partition 1

DISKPART> format fs=NTFS quick

DISKPART> assign letter=D

See http://technet.microsoft.com/en-us/library/cc770877.aspx

Share:
36,306

Related videos on Youtube

hpsoftware
Author by

hpsoftware

Updated on September 18, 2022

Comments

  • hpsoftware
    hpsoftware almost 2 years

    I am working on Server 2012 which doesn't have a GUI. For now, I have two hard disks. My first one is already formatted and I see it as C:

    Now, I'd like to format my second hard drive and create a D: partition.

    Are there any ideas how could I achieve this through command-line (like cmd or powershell)?

  • smaclell
    smaclell almost 9 years
    You might need to run a few commands to bring the disk online and make it writable prior to creating the partition. If you get a "Media is write protected" exception when running create primary partition run these steps.