How to wipe a hard drive using Diskpart and Format

by Mitch Tulloch [Published on 25 Jan. 2012 / Last Updated on 25 Jan. 2012]

Explains how to wipe a hard drive using the Diskpart and Format commands.

There are various tools out there you can buy or download for wiping hard drives, but it's easy to do this using the built-in Windows commands Diskpart and Format. Just take the drive you want to wipe out of the computer and insert it into another computer, then open a command prompt window on the second computer and type the following commands:


Select Disk N

In the above command N should be the disk number of the disk you are going to wipe.


Create Partition Primary



Now type the following command where X is the drive letter assigned to the new partition using the Assign command above:

Format X: /p:1 /v:CleanDisk /y

By scripting the above series of commands you can easily wipe all data from the drive in a single pass.

Mitch Tulloch is a seven-time recipient of the Microsoft Most Valuable Professional (MVP) award and widely recognized expert on Windows administration, deployment and virtualization. For more tips by Mitch you can follow him on Twitter or friend him on Facebook.

Featured Links