VMware Cloud Community
danscorpio
Contributor
Contributor

Create and Revert Snapshot

Hi

Could someone please give  a professional touch to this script so that I could Revert snapshot with results and then take a snapshot again

I would really appreciate your response.

Thanks

if ( !(Get-Module -Name VMware.VimAutomation.Core -ErrorAction SilentlyContinue) ) {

"C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1"

}

$srv= connect-CIServer -Server vcloud.link-connect.com -user xx -Password xxx -Org xxx

$vm = Get-CIvm "xxxx"-

$vm.ExtensionData.RemoveAllSnapshots() ???? Need Revert Script please !!

$vm.ExtensionData.CreateSnapshot($null,$null,"$null","$null")

Reply
0 Kudos
1 Reply
LucD
Leadership
Leadership

Isn't this a duplicate of VM Snapshot with Power shell cli ?


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

Reply
0 Kudos