How to wipe a hard drive using Diskpart and Format

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.

About The Author

Leave a Comment

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

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top