Forum Discussion

Baron164's avatar
Baron164
Brass Contributor
Aug 09, 2023
Solved

What is the best/proper way to migrate DHCP from Server 2012 R2 to 2022?

I have an old 2012 R2 DC that is running DHCP for my organization and I need to migrate the scopes to a new 2022 DC. Over the years I've simply re-created the scope since it was usually only one. However this server has over 50 individual scopes so I obviously don't want to re-create all of them. I have done some googling and have tried a few things but so far nothing has worked.

I have tried using the backup/restore function from the DHCP console but it fails with the message "The database was not restored correctly. No changes were made. For more information, please see Event Viewer on the specified server." When I check the event log I see EventID 1019 that says "The DHCP service failed to restore the DHCP registry configuration. The following error occurred:
Access is denied."

Some of the instructions I have found say to delete the DHCP database on the new server before attempting a restore. I have some test scopes in there that I would prefer to keep. Is it possible to merge the restore with the existing database or do I need to perform a complete overwrite?

I have also looked into using Powershell which would probably be simpler to use for this but again they all indicate I need to overwrite the existing database on the new server with the restore. Is this the only option?

I'm hoping someone here can give me some clarification on this.

  • The simplest is via PowerShell, also note from the documentation;    

         

    If you specify the ScopeOverWrite parameter and the scope being imported exists on the destination server, the scope on the target DHCP server service is overwritten. If this parameter is not specified and the scope being imported exists on the destination DHCP server service, a warning message is displayed and the import proceeds to process the next scope being imported.   

       

    Export-DhcpServer 

    Import-DhcpServer 

       

3 Replies

  • The simplest is via PowerShell, also note from the documentation;    

         

    If you specify the ScopeOverWrite parameter and the scope being imported exists on the destination server, the scope on the target DHCP server service is overwritten. If this parameter is not specified and the scope being imported exists on the destination DHCP server service, a warning message is displayed and the import proceeds to process the next scope being imported.   

       

    Export-DhcpServer 

    Import-DhcpServer 

       

Resources