Delete Spanned Drives (Dynamic Volumes) via Powershell

Copper Contributor

Hello guys,


I am relatively new to PowerShell, and I've done some research but still cannot find an answer to that.


Is there a way to delete a Spanned Volume via PowerShell?

I am able to delete Simple Volume with the command below, but this doesn't work for Spanned Volume:

Remove-Partition -DriveLetter "<Drive Letter>"


Can someone please help out ? 


(I actually need to use this in an Ansible Script)


2 Replies

using command

list volume
select volume <number>
delete volume


Using Powershell


drive letter (ex: "E")
Remove-Partition -DriveLetter "<Drive Letter>"

Hi @Seshadrr,

Thank you for your response.


I tried the PowerShell and it doesn't work:







As you can see, Drive Letter J is my Spanned Drive.

Can you help?