Dec 13, 2008 at 12:53 PM
If I have the VMName and the Snapshoot name, how could I use this function/filter to apply said snapshot to said VM?

I tried, Apply-VMSnapshot "VMName", "SnapshotName" with no result.
I looked into the library and noticed that there is only a Filter not a function and it seems to have the following signature: $SnapShot, [Switch]$force , [Switch]$Restart, [Switch]$wait

I tried: Get-VM "<vmname>" | Apply-VMSnapshot "<Snapshotname>"

and nothing :(

Is this even possible with this library?

Jan 11, 2009 at 12:17 AM
As you say the signature is $SnapShot, [Switch]$force , [Switch]$Restart, [Switch]$wait

You need to pass it a snapshot, NOT a VM.
Have you tried the example  that is embedded in the script

choose-vmsnapshot "vmname"  | Apply-vmsnapshot  ?

I may add the option to get a snapshot from the VM aname and Snapshot name for the next release