So I am in the process of rolling out a new 2012R2 DHCP Server Cluster, and I thought i would share my scripts with the community.
I have also rolled it into a Vagrant package so you can easily test it on your own, and execute the scripts by themselves against your environment to deploy.
Here is a link to the GitHub repository containing all the code.
The code is also fairly simple, it pulls in data from a few .CSV files and deploy’s the servers, installs the roles, creates the scopes, creates MAC Address allow policies and then creates a couple reservations.
Files to modify to customize your installation
dhcpservers.csv - IP’s of your two DHCP servers
createscopes.csv - Contains your Scope Name, StartRange, EndRange, Mask and Server to deploy to
scopeoptions.csv - Contains your server specific options. You can add more columns and adjust the code to add alternate options
scopeoptions.csv - Contains your scope specific options. You can add more columns and adjust the code to add alternate options
scopefailover.csv - Used to create Failover Scopes, Specify the ScopeID, PartnerServer, LoadBalancePercent, MaxClientLeadTime, AutoStateTransition, StateSwitchInterval and Server to deploy against
scopepolicy.csv - Used to create Scope Policies. In this example it creates a MAC Allow list, so only Mac Addresses listed will be allowed to pull leases.
scopereservations.csv - Used to create Scope Reservations. Input your ScopeID, MAC Address and Reservation Name. It automatically pulls an available IP and reserves it.
Execute the Vagrant package by downloading it and running.
Execute the powershell script by downloading the scripts folder and running.