Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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)?

share|improve this question

migrated from superuser.com Nov 15 '12 at 20:50

This question came from our site for computer enthusiasts and power users.

1 Answer 1

up vote 6 down vote accepted

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|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.