Reply to Message

View discussion in a popup

Replying to:
LucD
Leadership
Leadership

Try like this

$vmlist = Get-Content "C:\VM\Snapshots\vmlists.txt"

foreach($VM in $VMlist) {

    Get-Snapshot -VM $vm -Name 'Prior to install VM Hardware' |

    Remove-Snapshot -Confirm:$false

}

Disconnect-VIServer -Confirm:$false


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos