• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 539
  • Last Modified:

Powershell reset vm to snapshot then poweron

Hi,

I'm looking for a powershell command to reset a vm to a certain snapshot then power it on.

Please advise.
J.
0
janhoedt
Asked:
janhoedt
1 Solution
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
$snapshot = Get-Snapshot –VM myVM –Name ”Target-Snapshot”
Set-VM –VM myVM –Snapshot $snapshot
Get-VM myVM | Start-VM –confirm:$false

Open in new window


myVM is the virtual machine name
Target-Snapshot is the name of the snapshot to revert to.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now