DHCP Server Failed with Error Code 20079

During the post installation configuration of DHCP server, you may receive below error message:

Authorizing DHCP Server Failed, The authorization DHCP server failed with Error code 20079. The specified servers are already present in the directory service. If the DHCP server is not authorized by AD DS, it cannot respond to DHCP requests.

This error message may show up when migrating from one DHCP server to another or when setting up or rebuilding a new DHCP server. You could try uninstalling the DHCP server role, rebooting the server, and then reinstalling it. However, the same error might occur again.

Below is the screenshot of the error message:

DHCP Server Failed with Error Code 20079

Fix 1: Restart DHCP Server Service

Try to restart DHCP server service on the affected server. Restarting the DHCP server service will not impact any users. Therefore, you can try restarting the DHCP server service first and then run the DHCP Post-Installation Wizard to check if the issue is resolved.

To restart DHCP Server service, please follow below steps:

  1. Press Windows + R to open the Run dialog box.
  2. Type services.msc and press Enter to open the Services management console.
  3. Search for DHCP Server service and right-click on it > Click on Restart.

Restarting DHCP service will check, clear any errors and reload the service.

Performs TCP/IP configuration for DHCP clients, including dynamic assignments of IP addresses, specification of the WINS and DNS servers, and connection-specific DNS names. If this service is stopped, the DHCP server will not perform TCP/IP configuration for clients. If this service is disabled, any services that explicitly depend on it will fail to start.

About DHCP Server service

Restart DHCP Server Service

Fix 2: Unauthorize and Remove DHCP Server

If you are migrating from one server to another, there could be issues due to an existing DHCP server in Active Directory. In such cases, unauthorize the old and inactive DHCP server that is no longer needed. Follow these steps to unauthorize a DHCP server:

  • Login to the old DHCP server.
  • Press Win + R to open the Run dialog box.
  • Type dhcpmgmt.msc and press Enter.
  • Right-click on the server name and click Unauthorize.

After it has been unauthorized, you can remove it from Active directory by using below PowerShell commands. You can login to a domain controller and execute below commands.

Retrieves the list of authorized DHCP Servers

Get-DhcpServerInDC
Get-DHCPServerInDC

The Remove-DhcpServerInDC cmdlet deletes the specified DHCP server service from the list of authorized DHCP server services in Active Directory. As an example, I was using an old DHCP server 192.168.1.212 which has been unauthorized and now below command will remove it from AD.

Remove-DhcpServerInDC

Remove-DhcpServerInDC -DnsName "<dhcp server hostname>" -IPAddress 192.168.1.212

If a DHCP Server is already Unauthorized when you run the above command, you may receive below warning on the console:

WARNING: The DHCP server with IP address 192.168.1.212 is already de-authorized in Active Directory. Failed to initiate the authorization check on the DHCP server. Error: The RPC server is unavailable. (1722).

Check Event Viewer Logs

You could find more information about the error in the Event Viewer logs. There is a dedicated DHCP Server Folder in the Event viewer which logs all events related to DHCP Server. To check the logs, follow below steps:

  • Press Win + R to open the Run dialog box.
  • Type eventvwr and press Enter.
  • Go to Applications and Services Logs > Microsoft > Windows > DHCP-Server
DHCP Server Event Viewer Logs

Best Practices

  • Ensure that the DHCP Server is assigned a static IP Address.
  • If possible, use a separate server for DHCP Service.
  • Check the Event viewer logs for any DHCP server troubleshooting

Other Useful DHCP PowerShell commands

Authorize DHCP Server

Add-DhcpServerInDC -DNSName corp.cloudinfra.net -IPAddress 192.168.1.212

View Authorized DHCP Servers in Active Directory

Get-DhcpServerInDC

For complete list of PowerShell commands for management of DHCP server, please refer to the link: DhcpServer Module | Microsoft Learn

Leave a Comment