Windows: Managing Volumes in Command Prompt and Power Shell

Added: 7/30/17

Updated: 8/1/17

Today I’d like to make a short article on how I use Diskpart in Command Prompt and Powershell. Been reading a book on Powershell and it’s how I got hooked on this process in powershell as it’s much easier. But to get back to my roots, I figured I’d learn it again in command prompt, but with Microsoft doing everything in powershell these days, I wonder how much longer my roots will be needed. Anyways here we go:

Command Prompty:

  1. open up command prompt in a elevated state
  2. diskpart
  3. select disk 1
  4. list disk – * means its the active drive selected
  5. create partition primary size-2048
  6. list partition
  7. select partition 1
  8. format fs-ntfs (fs=file system)  quick (quick format)
  9. assign letter=H


Doing the same in Powershell:


  1. command prompt in administrator

  2. powershell

  3. get-disk

  4. get-disk | sort-object number

  5. new-partition -disknumber 2 -s (size) 4gb -driveletter N

  6. format-volume -driveletter N -filesystem NTFS — press Yes.