Then you could try like this
foreach($VM in $VMlist) {
Get-Snapshot -VM $vm | where{$_.Description -eq 'Prior to install VM Hardware'} |
Remove-Snapshot -Confirm:$false
}
Disconnect-VIServer -Confirm:$false
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference