Today my friend Marko Cepe sent me his VBS script that does great job to backup virtual machines that are running on Hyper-V.
This script does shut down virtual machine by sending shut down command to machine using integration services, then it waits virtual machine to enter stopped state, after that it does export of the machine and turns the machine back on.
|C:SKRIPTE> ExportVM.vbs VMName ExportDirectory|
|C:SKRIPTE> ExportVM.vbs TestVM X:BackupTestVM|
Click, download and enjoy the script.