Creating and Reverting to Snapshots to always have a clean system in in VMWare using PowerShell
$vm = 'Test-Box'
#Start Code on Checkout
New-Snapshot $vm -Name 'Lab-Base'
Start-VM $vm -RunAsync
#Stop Code on Checkin
Get-VM $vm | Stop-VMGuest -Confirm:$false
$snap = Get-Snapshot -VM $vm -Name 'Lab-Base'
Set-VM -VM $vm -Snapshot $snap -Confirm:$false
Get-Snapshot -VM $vm -Name 'Lab-Base' |Remove-Snapshot -RunASync -Confirm:$false
Code repository
https://bitbucket.org/tomstechshow/
My photo site
http://www.thomasnelsonphotography.com
How to support my channel
1 - Like videos
2 - Subscribe to my channel
3 - https://www.tomstechshow.com/contribute
4 - follow me on / toms_tech_show
5 - Check out the Facebook page https://fb.me/tomstechshow