if you’ve found yourself here then chances are you messed up one of your domain controllers or at least one of your dhcp servers. i admit i did. more than once. and i’m tired of querying for the elusive “remove-dhcpserverv4failover” powershell script to force delete the windows server dhcp failover relationship. the way content makes its way onto this site is usually split into two categories: repetition, and one time specialized content not found on the internet (at least difficult).
- pick the server you want to keep. look at your dhcp leases and determine which might be the most complete.
- stop the partner dhcp server so only one server is responding to dhcp requests
- try to assign clients from the partner dhcp server back to the server you want to keep. renew leases so to prevent potential conflicts.
- you are going to force the removal of the dhcp failover relationship. because there is no communication the partner server won’t transmit the latest changes and the scope won’t be removed from it. execute the following command in order to remove the relationship:
# command syntax: remove-dhcpserverv4failover -computername <servername> -name <dhcpfailoverrelationshipname> -force # real world example: remove-dhcpserverv4failover -computername win2016core-1 -name "win2016core-1.ad.sysinfo.io-win2016core-2.ad.sysinfo.io" -force
- you will get a warning that says: “failed to delete the failover relationship <name of the relationship> on the partner server <name of partner server>”. as i mentioned this is the expected behavior as you cannot communicate with the partner server.
- manually delete the scope from the partner server to ensure no conflicts arise if it accidentally becomes active.
and that should do the trick. if you wanted you could form again the relationship in case the issue was a problem with the server names or you could form a new relationship with a new server. either way just make sure you don’t have 2 dhcp servers assigned to the same ip scope that are not in a failover relationship.
in the event you have network communication with the partner in the relationship you can use the gui instead:
de-configure dhcp failover using server manager
step 1. open dhcp console. from server manager dashboard, click tools -> dhcp.
step 2. in dhcp console, expand ipv4 node. right-click the scope you want to de-configure failover and then click deconfigure failover.
step 3. ignore the warning and click ok.
step 4. click ok.
step 5. click close when you are done. you won’t be able to see a scope on partner server.