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:
- open up command prompt in a elevated state
- diskpart
- select disk 1
- list disk – * means its the active drive selected
- create partition primary size-2048
- list partition
- select partition 1
- format fs-ntfs (fs=file system) quick (quick format)
- assign letter=H
Doing the same in Powershell:
-
command prompt in administrator
-
powershell
-
get-disk
-
get-disk | sort-object number
-
new-partition -disknumber 2 -s (size) 4gb -driveletter N
-
format-volume -driveletter N -filesystem NTFS — press Yes.