Moving DHCP to a new server
Today I moved DHCP from one server to another. This, in itself, is not a remarkable thing. What is remarkable is that it worked the first time I tried it. No jumping back and forth, no database copying, no duplicate leases. Just worked. Wow.
This was from Windows 8.1 workstation managing Windows Server 2008R2 (old) and Windows Server 2012 R2 (new).
We now return you to your regularly scheduled "Looking at Lolcats on the Internet."
This was from Windows 8.1 workstation managing Windows Server 2008R2 (old) and Windows Server 2012 R2 (new).
- Install DHCP on the new box, but do not configure or authorize it.
- Open a powershell command prompt
- Use export-DHCPServer to dump the data out of the old server.
Export-DhcpServer –ComputerName dc1.fabrikam.com -File C:\export.xml -Leases -verbose - Use import-DHCPServer to load it into the new server.
Import-DhcpServer –ComputerName dc2.fabrikam.com -File C:\export.xml -Leases -BackupPath C:\dhcpbackup\ -Verbose - Open the DHCP mmc and add the old and new dhcp servers to the console.
- Authorize the new DHCP server.
- Restart DHCP on the new server so you don't have to wait for it to notice.
- De-Authorize the old DHCP server.
We now return you to your regularly scheduled "Looking at Lolcats on the Internet."
Comments