How Can We Help?
DiskPart Script to Wipe a Disk –
Create a plain text file (for example, wipe.txt) containing the following commands. Warning: Replace X with your actual target disk number. Running the clean command permanently removes all partition information and data from the selected drive.
select disk X
clean
How to Run the DiskPart Script:
- Open Command Prompt as an Administrator.
- Run the script using the
/sflag pointing to your text file: [1, 2]cmddiskpart /s C:\path\to\wipe.txtUse code with caution.
PowerShell Alternative (Clear-Disk)
To wipe a disk directly using PowerShell in an administrative window, run How to Completely Wipe a Hard Drive Using PowerShell:
Clear-Disk -Number X -RemoveData -RemoveOEM -Confirm:$$false
Use code with caution.
(Change X to your target disk number)