Wiki Ninja contest 2017!

Last December I wrote an article regarding the installation of Windows Server 201x using an unattend.xml file , a syspreped vm and some powershell Code. So the story is about an IT guy who needs to get things up and running blazingly fast when deploying. He also has to make sure that all of his setup is consistent no matter how many times the VMs are deployed plus the fact that you simply can’t open a HyperV manager console in Server Core.

So if you need to spin up a VM and have it deployed using a specified password and IP and all of the config needed for remoting , you need a way to provide all of these stuff during the installation and simply start the VM. Sounds great but wait a minute.

How do you configure all of these settings without console access? How do you do that if you simply have a Windows Server 2016 core and nothing else? Or if you do not want to use a whole bunch of consoles and mouse clicks?

The solution is easy: Use Unattend.xml files with a sysprepped VM. In the article I have posted on the TechNet WiKi you will find a sample unattend.xml which you can customize with the sample PowerShell code. The script will create a new vm, copy the sysprepped file in it , create a new vhd with the unattend.xml file and spin up the VM. In a few minutes …. voila! The VM is ready to accept connections with PowerShell remoting where you can continue workload setup.

Nano Server DNS

Nano server is Microsofts new implementation of Windows Server for the cloud born datacenters. Nano has a very small footprint that allows for better security and management. One of the roles that are supported on Nano Server is the DNS server and it makes perfect sense to have a Nano DNS server hosting your public DNS records as it will be super lightweight and a born security champion. Here comes the tough part , you have to configure Nano by using PowerShell.  To add some extra difficulty your primary DNS server should be located in a DMZ with the smallest possible attack surface so the only thing allowed would be remote management. Since I have a lot of labs going on and build up and tear down is trivial to success here is the PowerShell commands to configure your Nano DNS server. This specific code is from an O365 lab where numerous resource records have to be created for O365 suite to work , so you will get a great example of configuring most of the types of records required in a DNS server. It is build for a new DNS Zone but you can easily customize it and simply add records to your zone. Here it is: