vmware - Powershell remove-snapshot cmdlet -


I am working on a small script that will get all the snapshots in VM and will remove all snapshots in VM 6 Latest snapshots, details off.

My code looks like this now:

  get-snapshot-vm "test" | Sort-property descriptions | Removal snapshot?   

I am using a debt-date to make a description of every VM, the date it was created, and want to remove all the 6 latest snapshots. What is missing in my script to complete this task?

I was thinking about using the elderly, but I can not figure out how to get it, where it will remove snapshot 7 and after that.

There is a property in a snapshot that has been created so that you can sort on this property and the first 6 Leave it Test is in test environment and remove the WiFi switch to remove the snapshot.

  gadget-snapshot - wm test | Sort-object was created. Select object-skip 6. Remove snapshot - Confirm: $ False - Real    

Comments