I believe that it took me months of research and work to really figure out how to perform automation of the install for Windows Server Hyper-V instances.
Just the sheer amount of information out there in the 'DevOps' or 'Cloud Ops" spaces that really is specific to Linux and containers makes it kind of intimidating to really get to work and be productive with Windows automation projects and most of the folks who actually work in SRE and automation type roles still have the "LUNIX R00lz M$ DROOLz" attitude that is at least a decade out of date. This is a frequent difficulty I have experienced when trying to answer questions about cloud ops with Windows deployment targets; all of the people that have had successful Windows automation products that I know personally are folks that either have deployments/resources/understanding that are much more massive than mine, live in Azure all day, and don't have the concerns of premise hardware and even when they are working in Azure are frequently using Linux images and microservices due to the scale of their applications.
I know from many years in this field that having skills that are incremental and build upon foundational understandings are super important before jumping right into something that you have to maintain; I must admit, however, that I probably spent the better part of a year constantly combing through Reddit r/devops and r/sysadmin, participating in other communities, and reading through the descriptions of how to automate stuff at YUGE places that just don't apply to a smaller organization like mine. I also found myself attempting stuff way beyond the scope of anything that was useful for me or my actual day job that I tended to forget right after I chalked up a single win against my dozens of losses and rewarded myself by not looking at it again for a month.
I said to a friend the other day that the state of technology here in 2020 really is kind of more like a complete career change just keeping up with the new normal than it ever was just staying abreast of new technologies before. I think I probably am like the equivalent of someone who got really used to building log cabins walking into an ironworker skyscraper construction site. I feel like many engineers and tech managers are ignoring all of this, especially in healthcare or smaller organizations, because they don't have the time for the learning curve. I know that I sure don't! But, I am doing my best to prove myself wrong.
Much of my efforts in dipping my toes into the water of Infrastructure as Code (IaC) didn't really result in anything that was more useful than 'Hello World' yet when I found myself in a place of having to rebuild one particular instance for the umpteenth time (this particular Hyper-V instance acting as an appliance my network requires to function - an Ubiquiti UniFi controller on Ubuntu 18.04)...
well... I realized that even though it would be challenging to automate the deployment to premise Hyper-V instead of Azure or AWS, not only was it necessary so I didn't have to waste all those hours figuring out how to do it a fourth time, but that there had to be a better way to manage my infrastructure across two hosts and 300 nodes at an agency with 200 staff.
Yeah, sure, I've read Phoenix Project, but I also know that it is dumb to pretend to be Google or Microsoft when you very much are a small community organization with limited staff. I also know the XKCD comic about automation, but these tools actually have helped me get somewhere.
Powershell script to get you started
is below, feel free to make comments or suggestions for things that work for you or that you think will work out better. This will create a very base image and I suggest going through the install procedure just selecting Standard or Data Center as appropriate for your licensing, language and keyboard shortcut, and assigning the default local admin password.
The way that we make these "Golden Images" suitable to be used on different hosts/VMs
Boxstarter (https://boxstarter.org/) is a tool that
is designed to extend the Chocolatey package manager to be resilient across reboots and updates. I am very glad that I found this tool, because all of my previous automation efforts with PowerShell may have resulted in a 'Golden Image' which of course is very useful in and of itself, however, I didn't really have any other automated way to push out packages and changes in ways that seemed to retain persistence and not require me hopping onto a an RDP session to figure out what went wrong. My next update will be on more lessons I have learned in this process and I am sure the many defeats that lie ahead of me will ensure that perhaps the strategies will become refined in the process a little more.
Everybody is a beginner at something, and I know that I have only taken a couple steps down a long, dark, twisty, and windy road that hopefully will have milk and honey after a long treacherous journey!