How to DHCP migration from Windows Server 2019 to Windows Server 2022?
Before doing anything, we should have ready DC2019 and DC2022 Server ready and
DHCP role added in both Servers but DHCP scope added only in DC2019.
DC2019 - DHCP - Scope created 
| DC2022 - DHCP - No Scope created 
|
Now go to DC2019 , and create backup of DHCP Scope (if by change something happen, we could backup easily)
Click on Tools > DHCP Right click on dc2019.akshrestha.com Click on the “backup” option.
| |
Let’s check the win10 Client computer which takes the IPs from dc2019 DHCP server.
Open Win10 client computer which was joined with a domain. Open CMD, type ipconfig /all commands. You should see DHCP Enabled = Yes IPv4 = 192.168.0.101 DHCP Server = 192.168.0.2 (dc2019 server ip)
| 
|
Let go to DC2019 server and perform the DHCP migration tasks:
| 
|
Now if your server is a Remote server then you have to add [\\servername/ipaddress] but my server is a local server that’s why I don't have to type all the commands I have to type server only like below. netsh dhcp>server netsh dhcp server> help
(you will see the help list, choose export) Type netsh dhcp server>export C:\dhcp2019file all command You can go and check inside the C: drive, you will find dhcp2019file there. See the below snapshot

|
Go to dc2022 server, if you didn’t install dhcp role server then you should install that. But don’t add scope , like I said earlier.
Before start to migration, make sure you have to copy that dhcp2019file and paste in dhcp2022 server (don’t matter the location, you can paste it any location)
Before starting to migrate make sure, first STOP dhcp scope in dc2019 server.
Open PowerShell command from dc2022
Start to type cd\ (enter) C:\>netsh (enter) netsh>dhcp (enter) netsh dhcp>server (enter) netsh dhcp server>import C:\dhcp2019file (enter) this is file name path.
| 
|
Now open Server Manager (DC2022)
Now time to test, if our client computer get which DHCP server ip
Open Win10 client computer Open CMD command Type ipconfig /flushdns command Type ipconfig /release command Type ipconfig /renew command Type ipconfig /all You will see DHCP = dc2022 server ip.
Like this we could migrate successfully to DHCP. | 
|
The END
Comments