2 Methods to Quicky Wipe or Reconfigure Your Hard Drive


**Disclosure: This post contains affiliate links. If you make a purchase through these links, we may earn a small commission at no extra cost to you.

As you probably know, your hard drive is where things such as your operating system (Windows, Linux, macOS), application and user files are stored. You may have more than one hard drive installed inside your computer since many people like to have Windows, and their programs installed on one and then their user files on another to keep them separate. Many computers these days come with more than one drive and if you are into building your own computer, you most likely have more than one drive.

If you are a Windows user, then you most likely use the Disk Management tool to configure your hard drives. But sometimes the Disk Management MMC console might have issues or maybe you prefer to do things via the command line so using Disk Management might not be the best choice. In this article, we will be showing you 2 methods to quickly wipe or reconfigure your hard drive.

Windows Disk Management tool

Method 1 – Configure or Wipe your Drive Using the DiskPart command

The DiskPart command has been around Windows 2000 and replaced the older Fdisk command that we used prior to that. DiskPart is a command-line tool in Windows used for managing disks, partitions, and volumes, allowing you to create, delete, format, and modify storage devices.

For our example, we will be wiping Disk 1 along with its partitions\volume and data. So, if you have any important files on your drive, be sure to back them up before doing this procedure.

To start the process, we will need to open an administrative command prompt. To do so, type cmd in the Windows taskbar search box and from the results look for Command Prompt and then the Run as administrator option. You can also right click on the icon and choose Run as administrator.

Administrative command prompt

You will then see a UAC prompt appear and you will need to click Yes to approve it. You will also need to be an administrator on the computer or have access to the username and password for an administrator account on the PC.

Next, you will need to type diskpart to get to the Diskpart prompt.

Diskpart prompt

Next, you can type list disk to show the installed hard drives configured on your computer.

For the next step, you will need to know what hard drive you want to wipe or reconfigure. You can find this information in Disk Management if you do not know it off hand. For our example, we want to configure Disk one so we will type select disk 1 for our next command.

To wipe the drive and all its data and volumes, we will then type clean at the prompt.

2 Methods to Quicky Wipe or Reconfigure Your Hard Drive

Now if we go back to Disk Management, we will see that Disk 1 is not initialized and there is 100GB of unallocated space available which is the total space of the drive. We can now right click on Disk one where it says Not Initialized and choose Initialize Disk. Then we can right click on the unallocated space and create a new volume, choose how much space to allocate (or use all of it), format it and give it a drive letter and label (name).

Disk Management Not Initialized

We can also use DiskPart to create a volume and format it since we are still at the DiskPart command.

To do so, we will need to make sure that our disk is selected by typing select disk 1 again.

Next, we will create a volume\partition by typing create partition primary.

We will then format the partition with the NTFS file system and give the volume a name (label) called Data using the format fs=ntfs quick label=”Data” command.

Next, we will give the new drive the letter F by using the assign letter=f command.

Then we can type exit to quit DiskPart.

2 Methods to Quicky Wipe or Reconfigure Your Hard Drive

Now you can see that we have our new volume configured with its drive letter and label.

Windows Disk Management Tool

Method 2 – Configure or Wipe your Drive Using the PowerShell

The next method we will use to wipe and reconfigure our drive is by using a PowerShell script. To use the script below, you will need to edit the information on the lines with bold entries if necessary. Just be sure to use the right disk number that matches what Disk Management says so you don’t wipe the wrong drive.

    # Clean, Create Primary partition & Format your USB

Get-Disk

$DiskNumber = “1

$DriveLetter = “F

$FileSystem = “NTFS

$PartitionStyle = “GPT

$Label = “Files

# Action

Get-Disk -Number $DiskNumber

Clear-Disk -Number $DiskNumber -RemoveData -Cf:$false -Verbose

Initialize-Disk -Number $DiskNumber -PartitionStyle $PartitionStyle -Verbose -EA:’0′

Set-Disk -Number $DiskNumber -PartitionStyle $PartitionStyle

New-Partition -DiskNumber $DiskNumber -UseMaximumSize -DriveLetter $DriveLetter

Format-Volume -DriveLetter $DriveLetter -FileSystem $FileSystem -NewFileSystemLabel $Label -Force

#

Get-Disk -Number $DiskNumber

Get-PhysicalDisk | ? { $_.DeviceID -eq $DiskNumber }

Get-Volume -DriveLetter $DriveLetter

#

 

Now that we have the PowerShell script configured, we will open an administrative PowerShell window the same way we did for the command prompt. Simply type in PowerShell in the taskbar search box and run it as administrator.

Then you can copy the text from the script and right click inside the PowerShell window to paste it in. You will then see the script run and it should only take about 10 seconds to complete.

2 Methods to Quicky Wipe or Reconfigure Your Hard Drive

Now when you go back to Disk Management, you will see your new volume with the drive letter and label you configured in the PowerShell script.

2 Methods to Quicky Wipe or Reconfigure Your Hard Drive

For additional training resources, check out our online IT training courses.

Check out our extensive IT book series.

Related Posts

© 2025 Online Computer Tips
Website by Anvil Zephyr