0

DiskPart Commands to Clean and Format a USB or fixed Disk

I put together this little post to help people clean and format their USB or fixed disk in Windows 8.1, I needed this because some of my USB drives have previously been formatted with ESXi or Linux installed on them and this was the easiest way to bring them back to a useable format.

Continue after the break to see how to clean your ESXi or Linux formatted drive

Run an elevated command prompt or type diskpart in the search panel to bring up the DiskPart utility.

2015-01-24_12-48-44_thumb[7]

2015-01-24_12-49-42_thumb[1]

Type list disk to get a list of the disks in the computer.

2015-01-24_12-49-51_thumb[1]

Type sel disk 2 to choose the USB drive, your disk number may change depending on the amount of fixed drives you have installed. Important to note that sel is short for select, you don’t need to use the full word.

2015-01-24_12-50-00_thumb[1]

Type clean to remove all partition or volume formatting from the drive. On master boot record (MBR) disks, only the MBR partitioning information and hidden sector information is overwritten. On GUID partition table (GPT) disks, the GPT partitioning (and Protective MBR) information is overwritten.

2015-01-24_12-50-10_thumb[1]

Running list disk shows that the drive has now had the drive cleaned and that there is space available to use.

2015-01-24_12-51-05_thumb[1]

Type create part pri (you can shorten this further to cre part pri) will create a primary partition on the current basic disk.

2015-01-24_12-51-38_thumb[1]

Type format fs=ntfs quick to format the new partition with the NTFS file system, you can ignore the fs=ntfs command and the disk will be formatted with FAT32 by default.

2015-01-24_12-51-49_thumb[1]

Type active to mark the partition or volume as a valid system partition or system volume.

2015-01-24_12-51-59_thumb[1] 

Type exit to close the program

Simon

Leave a Reply

Your email address will not be published. Required fields are marked *