This may not be the “official” way to create a template for Hyper-V according to Microsoft, but if you are running in an environment without SCCM or WDS (or on your personal machine), I’ve found that this process works very well.
This is fairly simple list of tasks, but it’s very long. Thankfully, you’ll only need to do this once and then you can re-use the image as many times as you like. I update mine once a quarter (to get the newest updates).
Tweak where it’s appropriate for your build.