Skip to main content

DHCP Migration


Here's how to get your DHCP data and config from one server to another.

Disclaimer:  These commands have not been tested in all environments or implementations.  They may contain typos or errors.  Updates not guaranteed so some commands may be deprecated.  If you need more detailed instructions, you probably shouldn't be attempting this.  Edit closely and use at your own peril.

Steps:

  • Log on to the existing DHCP server.
  • Open an elevated command prompt
  • On the Action menu (from within the DHCP management console), click Backup.
  • Type netsh dhcp server export C:\dhcpTemp\dhcp.txt all, and then press ENTER.
  • Install the DHCP role on the new DHCP server using Server Manager.
  • Copy the exported DHCP text file to the new DHCP server.
  • Verify that the DHCP service is installed and started on the new DHCP server.
  • On the new server, open an elevated command prompt
  • Type netsh dhcp server import C:\dhcpTemp\dhcp.txt all, and then press ENTER
  • Open DHCP management console on the new server.
  • In the console tree, right-click DHCP, click Authorize.

Other Commands:


Export-dhcpserver –computername WPDDC1 –leases –file C:\dhcpTemp\dc1dhcp.xml –ver

Import-dhcpserver –computername WPDDC2 –leases –file C:\dhcpTemp\dc1dhcp.xml –backuppath C:\DHCPBU\Backup -ver

Comments

Popular posts from this blog

Welcome to The Egg Basket!

Welcome to The Egg Basket.  Here you'll find a mix of tech tips, fixes, and suggestions, as well as information about life in the digital age at large.  This will also serve as my own personal knowledgebase for issues I've come across.   Subjects may include but are not limited to Windows Server, Group Policy, Active Directory, Exchange Server, Exchange Migrations, Azure, Microsoft 365, VMware, Cisco ASA,  Windows 10, Windows 11, Android, Data Protection, Veeam, and Data Security. I hope you'll find it useful.

Denied by Default

I recently installed a fancy new firewall for a client.  Out of the box, the web filtering policies are blocking the installation of Office 365 apps from Microsoft. Curious, yes.  The category responsible for blocking is Risky Downloads .  Installing Office Apps? Risky, indeed. I had to add a Web Protection Exception with the following entries: ^([A-Za-z0-9.-]*\.)?microsoft\.com/ ^([A-Za-z0-9.-]*\.)?windowsupdate\.com/ ^([A-Za-z0-9.-]*\.)?officecdn.microsoft.com.edgesuite.net/ ^([A-Za-z0-9.-]*\.)?officecdn.microsoft\.com/ ^([A-Za-z0-9.-]*\.)?windows\.com/ What a wonky syntax.  Can you guess what the firewall vendor is?

Selective Screenshot Whaaa?!

So, I was today years old when I learned that there's an easy way to do a screen snip in Windows 10!   All along, I had been hitting PrtSc and then pasting the result into Paint, and then cropping the image to select the portion I wanted. No more! Simply hit Win-Shift-S on your keyboard. (Hold the Windows key, hold Shift, and press the letter S, all at the same time.) Your screen will dim, and you can use your mouse to drag and select the area you want. There are also some fun options that appear:  Freeform Snip, Window Snip, and Full Screen Snip. Enjoy!