X

Force Delete Windows Server DHCP Failover Relationship

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).

 

  1. Pick the server you want to keep. Look at your DHCP leases and determine which might be the most complete.
  2. Stop the partner DHCP server so only one server is responding to DHCP requests
  3. Try to assign clients from the partner DHCP server back to the server you want to keep. Renew leases so to prevent potential conflicts.
  4. 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
    
  5. 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.
  6. 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.

Disqus Comments Loading...
All Rights ReservedRegular Version