.\hvcmd.ps1 start|stop|pause|save|stop|shutdown|snapshot machinename
Example starting server "srv01":
.\hvcmd.ps1 start srv01
Example taking a snapshot for server "srv01":
.\hvcmd.ps1 snapshot srv01
How to run it via Task (example):
powershell d:\hvcmd.ps1 "pause srv01"
This powershell script does the following for you:
Start, stop, save, pause, shutdown your HyperV machine. Take snapeshots via script / automated.
Maybe, there will be loging and more in future version.
Since i have searched for a long time and did not find any script, that "does it all" for me, i had a look after a lot of technical ressources and scripts. Most scripts could not take snapshots or shutdown the virtual machine and some did not work properly.
Special regards to the Microsoft technet team and a lot of authors wich provided good informations.