Using a Script to Set the IP Name and DCPromo Windows Server 2012 R2
In lab environments you need to quickly set the IP, rename and promote a Domain Controller. This also allows for uniformity in labs, since the DCPromo can be done so many ways. Anytime you automate the lab it helps your outcome of a successful reproduction of a lab or problem.
The script below was created for classes I teach an MCSE track at the school I work for. It should be used in conjunction with the VMware 2012 lab setup (video is below). However it can be modified and used independently for production. It is written in PowerShell and conforms to the PowerShell 3 standards.