• Contact
  • Homelab
Dimitris Tonias
  • Management
  • Monitoring
  • Cloud
  • Virtualization
  • Networking
  • Productivity
No Result
View All Result
  • Management
  • Monitoring
  • Cloud
  • Virtualization
  • Networking
  • Productivity
No Result
View All Result
Dimitris Tonias
No Result
View All Result

Import and Export DHCP Server 2016 settings

Dimitris Tonias by Dimitris Tonias
March 3, 2018 - Updated on April 21, 2024
in Management
Reading Time: 2 mins read
A A
7
Share on FacebookShare on Twitter

In this article, we will look at how to export and import all settings from one DHCP Server to another. This method is used when we need to migrate an older DHCP Server (eg Windows Server 2008 R2) to a new server (eg Windows Server 2016).

The export and import process can be done either through the command line using the Netsh tool or through the PowerShell using the corresponding cmdlets that we will see below. Microsoft, apparently, suggests using PowerShell in these cases as Netsh is deprecated.

Additionally, if you use the DHCP Failover and DHCP Policies features, then PowerShell is a one-way street because the Netsh command does not support extracting these objects.

Export and Import of DHCP settings using Netsh

Log in to the DHCP Server you are about to shut down, open the command line with administrator privileges, and type the following command.

netsh dhcp server export C:\DHCP-Config.txt all

netsh dhcp server export C:\DHCP-Config.txt all

Obviously, the .txt file can be named as you want as well as saving it to a folder of your choice. Just make sure to create it before it as netsh does not automatically create it.

Then connect to the new DHCP Server and copy the .txt file to the disk. Reopen the command line with administrator privileges and type the following command.

netsh dhcp server import C:\DHCP-Config.txt all

netsh dhcp server import C:\DHCP-Config.txt all

Obviously, you will need to change the location of the file to suit your case.

Export and Import DHCP settings using PowerShell

Log in to the DHCP Server you are about to remove, open PowerShell with Administrator privileges, and type the following command to export all the DHCP Server settings.

Export-DhcpServer -ComputerName DC01 -File "C:\DHCP-Config.xml" -Force

Export-DhcpServer -ComputerName DC01 -File "C:\DHCP-Config.xml" -Force

Then connect to the new DHCP Server and copy the .xml file to the disk. Open PowerShell with Administrator privileges and type the following command to import the settings from the file.

Import-DhcpServer -ComputerName DC02 -File "C:\DHCP-Config.xml -Force

Import-DhcpServer -ComputerName DC02 -File "C:\DHCP-Config.xml -Force

In both cases, you can skip the -Force parameter to confirm your action in the corresponding message that appears.

As I mentioned above, only the export and import methods exist in this article. If you are going to migrate the DHCP server from one server to another, it is a good idea to read all the steps you will need to follow to successfully complete it.

Tags: DHCPDHCP ServerWindows Server 2016
ShareTweetPin
Previous Post

Backup and Restore DHCP Server 2016

Next Post

Migrate DHCP Server to a new Windows Server

Related Posts

Approve updates in WSUS 2016
Management

Approve updates in WSUS 2016

Configure Group Policy to deploy updates using WSUS 2016
Management

Configure Group Policy to deploy updates using WSUS 2016

Configure computer groups in WSUS 2016
Management

Configure computer groups in WSUS 2016

The initial configuration of WSUS 2016
Management

The initial configuration of WSUS 2016

Install WSUS in Windows Server 2016
Management

Install WSUS in Windows Server 2016

Error opening Report Viewer on WSUS 2016
Management

Error opening Report Viewer on WSUS 2016

Comments 7

  1. Darrelle Alexander says:
    6 years ago

    HI, I was trying to figure out how to export and import just the filter list into a DHCP server used as a failover, but I’m coming up dry. Do you have any pointers?

    Reply
  2. Bob Burke says:
    6 years ago

    Hi, I’d like to export from a 2016 server to 2012. I’m getting an error that version 6.3 is not compatible with file version 10.0. Any ideas?

    Reply
  3. B says:
    5 years ago

    Just had the same problem, If you still interested in answer, Just edit the XML file and change the MajorVersion to 6 from 10 and MinorVersion to 3

    Reply
    • R says:
      2 years ago

      Thanks B saved my life with that one

      Reply
  4. Pavel says:
    5 years ago

    Powershell need backup folder when importing so the command on this page is not complete.
    It should be:
    Import-DhcpServer -ComputerName -File C:\DHCP-Config.xml -BackupPath -Force
    Backup folder is that folder, which is in system32\DHCP\Backup

    Reply
  5. Nigel Bradbrook says:
    4 years ago

    Thanks for this has saved me a lot of time

    Reply
  6. Aaqib Bhat says:
    3 years ago

    Simple neat and clean
    Working like a charm

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result
Zabbix server: More than 75% used in the trends cache
Monitoring

Zabbix server: More than 75% used in the trends cache

In Zabbix, "trends" are a type of data storage representing aggregated historical data. Zabbix monitors and collects a vast amount...

Read moreDetails
Check word count on Google Docs

Check word count on Google Docs

Zabbix server: More than 75% used in the configuration cache

Zabbix server: More than 75% used in the configuration cache

Approve updates in WSUS 2016

Approve updates in WSUS 2016

Configure Group Policy to deploy updates using WSUS 2016

Configure Group Policy to deploy updates using WSUS 2016

Configure computer groups in WSUS 2016

Configure computer groups in WSUS 2016

The initial configuration of WSUS 2016

The initial configuration of WSUS 2016

Get more stuff

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

we respect your privacy and take protecting it seriously

  • Contact
  • Homelab

© 2024 Dimitris Tonias

No Result
View All Result
  • About
  • Contact
  • Free Tools
  • Home
  • Homelab

© 2024 Dimitris Tonias

This website uses cookies. By continuing to use this website you are giving consent to cookies being used.