Hi LucD, thanks for that. My PS skills are pretty weak and although I managed to use your code to create and monitor a snapshot, I'm not sure how I could do that for multiples?
At the moment, I'm importing a CSV which contains a list of VMs to snapshot.
Fairly simple stuff:
$vms2snap=import-csv c:\temp\test_snapshot1.csv
foreach ($machine in $vms2snap) {
$vm_to_snap = $($machine.'computer')
get-vm -name $vm_to_snap | new-snapshot -name snaptest -Memory -RunAsync
}
Do you know how I could then go through and check the status of the snapshots? Just not sure how to incorporate your code into it.
Thanks.