You can filter for hard disks other than hard disk 1 using the Where-Object cmdlet. E.g.
$HDD = Get-HardDisk -VM $vmname | Where-Object {$_.Name -ne 'Hard disk 1'} | Remove-Harddisk
You can filter for hard disks other than hard disk 1 using the Where-Object cmdlet. E.g.
$HDD = Get-HardDisk -VM $vmname | Where-Object {$_.Name -ne 'Hard disk 1'} | Remove-Harddisk