PS - Remove Legacy DHCP Servers

To Identify the DHCP Servers Authorised in Active Directory run the following command:

Get-DhcpServerInDC

This will display the IP address and DNS name of any authorised DHCP servers

you can then run the following command to remove any legacy entries:


Remove-DhcpServerInDC -DnsName SERVER1.DOMAIN.LOCAL -IPAddress 10.0.0.89

If you receive any of the following errors:

WARNING: The DHCP server SERVER1.DOMAIN.LOCAL with IP Address 10.0.0.89 has been successfully de-authorized in Active Directory. Failed to initiate the authorization check on the DHCP server. Error: There are no more endpoints available from the endpoint mapper.  (1753).

or

WARNING: The DHCP server SERVER1.DOMAIN.LOCAL with IP address 10.0.0.89 is already de-authorized in Active Directory. Failed to initiate the authorization check on the DHCP server. Error: There are no more endpoints available from the endpoint mapper.  (1753).

Or

"There is no such object on the server”. 

If you do, you will need to use the ADSIEDIT MMC to remove the objects from Active Directory.

  1. Start Adsiedit.msc.
  2. Open the configuration Container.
  3. Expand Services.
  4. Expand Net Services.
  5. On the right hand side you will find a record named CN=DHCPRoot
  6. Right Click the CN=DhcpRoot entry and then click Properties
  7. Highlight DhcpServers Attribute and click Edit.
  8. Highlight the entry with the old Domain name and click Remove from DHCPServers Attribute.
  9. Click OK to close DHCPServers editor’s screen.
  10. Once deleted the DHCPServers value will be “not set"
  11. Save the change by clicking OK and close Adsiedit.
  12. Restart the DHCP server service.

Comments