Remove-Harddisk

This post was originally published on this site

Good morning,

 

I decided to see if I can automate removal og RDMs from a Windows cluster node in order to migrate.

This turned out not to be difficult at all, and the following works:

 

Get-VM node02 | Get-HardDisk -DiskType RawPhysical, RawVirtual | Remove-HardDisk -Confirm:$false

 

The problem is that this command also deletes the SCSI controllers.

 

Is there a way to remove the RDM pointers/disks and still keep the SCSI controllers?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.