VMware

This Question is Answered

1 "helpful" answer available (6 pts)
4 Replies Last post: Nov 3, 2009 5:20 AM by gwagchunks  

Snapshot question posted: Nov 3, 2009 4:57 AM

Click to view gwagchunks's profile Novice 4 posts since
May 15, 2008

Hello Everyone

Quick question. What is the difference between: "get-snapshot | remove snapshot " and "remove-snapshot" cmdlets? Basically I clone some VMs over to our DR site, and sometimes even thought the clone works OK, a temporary clone snapshot gets left on the original VM and I have to go in and delete it.

Thanks a lot.

Re: Snapshot question

1. Nov 3, 2009 5:05 AM in response to: gwagchunks
Click to view LucD's profile Champion vExpert 3,078 posts since
Oct 31, 2005
Could you perhaps give us a bit more context on the
{noformat}
Get-Snapshot | remove snaphot
{noformat}

I don't know the "remove" cmdlet.
Is this perhaps an alias or a function that was defined in your environment ?
Can you do a
{noformat}
alias remove
get-command remove
{noformat}

Re: Snapshot question

3. Nov 3, 2009 5:18 AM in response to: gwagchunks
Click to view LucD's profile Champion vExpert 3,078 posts since
Oct 31, 2005
These are both the same cmdlet, Remove-Snapshot.

In the code you are using, you 'pipe' the snapshot object that you got with the Get-Snapshot cmdlet to the Remove-Snapshot cmdlet.
The cmdlet on the poster works in the same way.

The 2nd way of using the cmdlet is by giving the snapshot object via the -Snapshot parameter
Like this:
{noformat}
Remove-Snapshot -Snapshot (Get-VM DR_testsvr | Get-Snapshot) -Confirm:$false
{noformat}

VMware Beta Programs

Want to be Considered for Future Beta Programs?

Learn More

VMware Developer

Download SDKs, APIs, videos,
training, and more in the Developer community.

Learn More

Developer
Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld
Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

Only VMware ... Delivers Nexus 1000V

Ensure consistent, policy-based network capabilities to virtual machines across your data center.

Learn More

Communities