Configuring Windows Server 2012 R2 DHCP Failover with PowerShell and Resolving Custom Options Error 20010.

For the first time, WS 2012 R2 offers a true DHCP failover and load balance solution that works. After recently migrating to Windows Server 2012 R2 DHCP, I went a step further to configure failover to a partner server with the following steps:

1) Log in to the primary Windows Server 2012 R2 DHCP server and verify that the DHCP server scopes and options are setup correctly and running.
2) Log in to the target DHCP partner server. Configure a static IP address on this server. Install the DHCP service and authorize the server after the role installation. Note that no scopes or options are configured at this time :


Install-WindowsFeature -Name dhcp -Restart -IncludeAllSubFeature -IncludeManagementTools -Verbose

3) Authorize the partner DHCP Server:


Add-DhcpServerInDC -DnsName -Verbose

4) Run the following powershell cmdlet to configure Dhcp failover in Hot-Standby mode (Active-Passive):

Add-DhcpServerv4Failover -ComputerName dhcp00 -Name Dhcp00-Infra03-Failover -PartnerServer infra03 -ScopeId,,, -ServerRole Active -Verbose



5) Run the Get-DhcpServerv4Failover cmdlet to display the current properties for the Failover Configuration and it’s current state:


In one case, while testing, I encountered an “Error 20010 failed to get option definition for option id 249 on dhcp server : the specified option does not exist. (20010).”
In this scenario, I used the DHCP snapin. In the DHCP snap-in on the primary server, right-click the IPv4 container and choose “Set Predefined Options”, then scroll through values in the “Option Name” drop down box with the keyboard arrows or mouse wheel until you see the “Delete” button light up (that’ll be a custom value). Hit Edit and copy the values down, then in the same place on the partner server, hit Add and enter the custom values.

I am yet to find a way to locate custom DHCP options using powershell.

This entry was posted in DHCP, DHCP Failover, DHCP High Availability, PowerShell, Powershell 4.0, Windows Server 2012, Windows Server 2012 R2 and tagged , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s