I need to migrate DHCP from a server running 2012 R2 to Server 2019. I see there is a new migration tool however I wish the new server to have the same IP address as the old server. Does anyone have the steps or a guide for this?
Thanks.
I need to migrate DHCP from a server running 2012 R2 to Server 2019. I see there is a new migration tool however I wish the new server to have the same IP address as the old server. Does anyone have the steps or a guide for this?
Thanks.
@EdDias-7026 Hi,
Thank you for posting in Q&A!
I've done tests in my own environment with server 2012R2 and server2019, it can be done by PowerShell command, please follow these steps:
1.Log in with an administrator account to the Windows Server 2012 R2 system.
2.Open Powershell and then type in the following command:
Export-DhcpServer -File C:\DHCPdata.xml -Leases -Force -ComputerName old.network.local –Verbose
3.Copy the file C:\DHCPdata.xml the Windows Server 2019 system.
4.Install and configure the DHCP role on Server 2019
5.Start the DHCP service.
6.Type in the following command on Powershell to import the DHCP Data.
Import-DhcpServer -File C:\DHCPdata.xml -BackupPath C:\DHCP\ -Leases -ScopeOverwrite -Force -ComputerName new.network.local –Verbose
7.Restart the DHCP service.
Verify your DHCP scope, IP leases, reservations etc and they should match with DHCP Server 2012 R2.
Hope you have a nice day : )
Gloria
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
https://docs.microsoft.com/en-us/answers/articles/67444/email-notifications.html
Dude this was exactly what I needed, This was amazing. Thank you for taking the time to post this information.
You can follow along here to migrate role to new server.
https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/dn495428(v=ws.11)
then read through this one about re-iping the server.
https://social.technet.microsoft.com/Forums/Lync/en-US/aeff964c-7040-42dc-92a6-6de5732598d4/changin-the-ip-address-of-authorized-dhcp-server?forum=winserverDS
--please don't forget to Accept as answer if the reply is helpful--
Thanks but your first link is dead.
Edit: the ending ) isn't included in the link so I added it manually.
Just reading through that guide. Isn't that for older server versions? Rather than the newer Export-DhcpServer powershell command?
Yes, you can certainly also do via PowerShell
https://docs.microsoft.com/en-us/powershell/module/dhcpserver/export-dhcpserver?view=win10-ps
https://docs.microsoft.com/en-us/powershell/module/dhcpserver/import-dhcpserver?view=win10-ps
but probably should unauthorize old, do the addressing changes, then authorize new one.
--please don't forget to Accept as answer
if the reply is helpful--
Thanks, for changing the IP address after migration , is it just a simple case of changing it in the normal via the connection properties?
So steps would be.
run export powershell on old server. Deauthorize it in DHCP
Change IP of old server
Install DHCP server role on new server.
CHange ip to old server ip
Run import powershell
Auth new server with new ip (of old server)
Test!
Relax
Well I exported and imported and the only red that appeared during the import was:
VERBOSE: Importing option definitions on server...
Import-DhcpServer : Failed to add option definition 249 on DHCP server server.name.local. : The specified
option already exists. (20009)
At line:1 char:1
+ Import-DhcpServer -file "c:\export\dhcpdata.xml" -backuppath "c:\back ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceExists: (249:root/Microsoft/...ptionDefinition) [Import-DhcpServer], CimExceptio
n
+ FullyQualifiedErrorId : DHCP 20009,Import-DhcpServer
I've authorised the new server and tested and it seems to be dishing out IP addresses.
thanks
EdDias did you just export and import using powershell or you have used Windows Server Migration tool?
9 people are following this question.