Author Posts

January 30, 2018 at 3:38 pm

Hello Guys,

I am aware that I can easily create a Hyper-VM with the xHyper-V resource. I am also aware that I can place a configuration file inside windows so Windows can apply the configuration at startup. But can I automate the installation of Windows itself?

So my goal is that I create a HyperV-VM, install the OS automatically and then place a DSC file inside Windows so PowerShell can apply it at startup. The only part I am missing is the automated Windows install.

January 30, 2018 at 7:39 pm

An Windows unattended installation has been a common thing for many, many years now. This is fully documented on TechNet and many other resources.

When you say...

The only part I am missing is the automated Windows install.

What exactly are you looking for that is not already provided by TechNet resources relative unattended Windows install?

Resources

The Windows Deployment Services (WDS)...
http://technet.microsoft.com/en-us/windowsserver/dd448616.aspx

Windows Deployment Tools Technical Reference
https://technet.microsoft.com/en-us/library/hh825039.aspx

Utilizing Windows Deployment Services in Windows Server 2012 R2...
https://blogs.technet.microsoft.com/canitpro/2014/08/21/utilizing-windows-deployment-services-in-windows-server-2012-r2
...functionality is the "supported" method to do automated installations of server and client OS's in a fully-featured way.

If you don't want to go that heavyweight you could look at building unattended answer files
http://technet.microsoft.com/en-us/library/ff699026.aspx

that will be used to automate the setup process. This is also a "supported" process, but you're more "on your own" and it's not a completely integrated solution. (You sound like you're comfortable writing code so this might just be up your alley.)

Automatic Installation of Hyper-V Hosts with Windows Server 2012 R2
This is an unattended.xml Installation File for an automatic Installation of Windows Server 2012 R2 Hyper-V Role.The unattended file is generated through Windows System Image Manager. Download the File, place it in a root volume during setup, i.e. a USB Media. It will be detected
https://gallery.technet.microsoft.com/Automatic-Installation-of-1dd3266f

February 18, 2018 at 10:32 am

The automation of your entire machine could be done with DSC. If you slip the MOF file and the dependant modules directly into the VHDX then on boot DSC will take over and configure everything. You could go one step further and copy the meta mof in the VHDX, on boot the machine should then go to appropriate pull server and pull all the configs and modules it needs. Microsoft has a good article about the process for doing that https://docs.microsoft.com/en-us/powershell/dsc/bootstrapdsc. Hope this helps