HI gurus
I have the remove-snapshot done but sometimes the vm has more than 2 Snapshots, how do I go and write my script to wait for one snapshot to be done before starting the next one.
Thanks
Isn't the standard sequence already doing that?
The snapshots are passed one-by-one through the pipeline to the Remove-Snapshot cmdlet.
And the pipeline only continues when the Remove-Snapshot is completed, as long as you don't use the RunAsync switch.
Get-VM -Name 'MyVM' |
Get-Snapshot |
Remove-Snapshot -Confirm:$false
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Isn't the standard sequence already doing that?
The snapshots are passed one-by-one through the pipeline to the Remove-Snapshot cmdlet.
And the pipeline only continues when the Remove-Snapshot is completed, as long as you don't use the RunAsync switch.
Get-VM -Name 'MyVM' |
Get-Snapshot |
Remove-Snapshot -Confirm:$false
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
LucD
Thanks a bunch, that is the part I did not know if the process did one by one.
Thanks a bunch again