If still needed, I have written this script to produce a new Hyperv VM from existing one (which acts as a template): https://github.com/ageoftech/hyperv-vm-builder