The following powershell script creates snapshots or exports of VMs on the local, and performs retention/cleanup as well. Be forewarned. There are known bugs with the current hyper-v snapshot integration and *nix systems.