Below are the example on how to restore Hyper-V Snapshot by using Powershell command.
PS command line :-
Restore-VMSnapshot –Name (name for the snapshot) –VMName (name for the VM) -confirm:$false
(if you apply –confirm:$false its means will not prompt out and automatically execute.)
PS command line :-
Restore-VMSnapshot –Name (name for the snapshot) –VMName (name for the VM) –confirm
(if you apply just a –confirm its means will prompt out for you to choose whether want to revert snap shot or not )
you can save it to *. PS1 after copy and paste to notepad.
0 Comments