VMware Cloud Community
MariusRoma
Expert
Expert
Jump to solution

Checking snapshot creation

A PowerCLI script include a statemet like:

get-vm $myvm | new-snapshot -name $mysnapshotname -Description $mysnapshotdescription

How can i check that the snapshot was created correctly and that I can trust it?

Regards

marius

1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

The New-Snapshot cmdlet will return a Snapshot object when all went well.

If that object is not returned, something went wrong.

Besides reverting to a snapshot, there are not really any other methods of testing the consistency of the snapshot that was taken.


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

View solution in original post

3 Replies
LucD
Leadership
Leadership
Jump to solution

The New-Snapshot cmdlet will return a Snapshot object when all went well.

If that object is not returned, something went wrong.

Besides reverting to a snapshot, there are not really any other methods of testing the consistency of the snapshot that was taken.


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

MariusRoma
Expert
Expert
Jump to solution

Many thanks.

Let me ask a further clarification: how can I inspect the returned object?

I made a test writing:

$mysnapshot = new-snapshot -VM $myvm -name $mysnapshotname -Description $mysnapshotdescription

$mysnapshot | get-member

but it doest not work...

Regards

marius

0 Kudos
LucD
Leadership
Leadership
Jump to solution

What exactly does not work?

Don't you get any output from the Get-Member?

Is $mysnapshot empty?


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

0 Kudos