How to delete a partition using the PowerShell command

You can delete any partition in Windows 10 with a PowerShell command. Here is the exact command and how to execute it.

Step 1. Open the PowerShell application with admin rights. To do that, right-click on the Start menu and select the option "Windows PowerShell (Admin)" .

Step 2. Get the list of partitions using the "Get-Volume" cmdlet . This command will display a table in the PowerShell window with all available partitions.

Picture 1 of How to delete a partition using the PowerShell command

Step 3. To remove a partition, execute the command below. Replace "X" with the actual drive letter of the partition you want to delete. For example, to delete partition "E" , replace "X" with the drive letter.

Remove-Partition -DriveLetter X

Picture 2 of How to delete a partition using the PowerShell command

Step 4. Type "Y" into the PowerShell window and press Enter. This action will confirm that you really want to get rid of the target partition.

Picture 3 of How to delete a partition using the PowerShell command

As soon as you confirm the action, Windows PowerShell will delete the partition and mark it as unallocated.

Since the deleted space is marked as unallocated, you can use it to create a new partition or extend an existing one. If you want to extend the partition, we recommend first backing up all the files in the partition you want to extend.

Furthermore, use the partition manager GUI tool, like the built-in Disk Management tool. This is especially important if you've never done this through the command line.

You've just finished reading the article "How to delete a partition using the PowerShell command" edited by the TipsMake team. You can save how-to-delete-a-partition-using-the-powershell-command.pdf to your computer here to read later or print it out. We hope this article has provided you with many useful tech tips and tricks. You can search for similar articles on tips and guides. Thank you for reading and for following us regularly.

« PREV How to use PuTTY on Cisco routers and switches
NEXT » Warning: Rogue - malicious software that steals sensitive data