Format A USB Flash / Hard Drive Using PowerShell

The internal workings of a hard drive
Skylar McGonigle | 2022-07-11 | 1 min read

OS: Windows 10

Ever try to format a USB drive but it says there's only 2MB on a it? The following steps will resolve the issue.

Open PowerShell by hitting the "Start" button or Windows Key + R and typing powershell

Now run the following commands:

list disk

Replace the # symbol with the disk number you want.

select disk #

Confirm you have the right disk:

detail disk

WARNING: The next action will completely erase all data on the disk. Confirm you have the right disk before continuing.

Erase the disk:

create partition primary

Format the USB Flash Drive (Skip if formatting a hard drive):

format fs=fat32 quick

Format the Hard Drive (Skip if formatting a USB flash drive):

format fs=ntfs
All Done!