Share via


Export of DHCP Scope for Windows 2008 R2

Question

Thursday, April 21, 2016 2:31 AM

Hi Experts,

Need some advice. Id need to know how i can export a scope that includes all settings, reservations etc from 1 server and then import it to another server. During import, does the scope get auto-activated or would I be able to activate accordingly ?

Does this command netsh dhcp server v4 export c:\dhcp "192.168.1.0" export the full scope, settings reservations and everything else ?

Pls advise. Thanks

All replies (5)

Thursday, April 21, 2016 5:56 AM âś…Answered

Hi jengo00,

>>netsh dhcp server v4 export c:\dhcp "192.168.1.0"

I test in my lab.Type like this:

netsh dhcp server \DHCP_server_name scope xx.xx.xx.0 dump > c:\dhcpscope.txt

It contains all settings.

  Best Regards,

Cartman

Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected].


Thursday, April 21, 2016 2:51 AM

Hi,

Netsh is probably not the best way in 2008 R2.  I would suggest to use powershell instead.

Here is few examples --> https://technet.microsoft.com/en-us/library/jj590659(v=wps.630).aspx

This example export all settings and all scopes with leases

Export-DhcpServer -ComputerName dhcpserver.mydomain.com -File C:\Temp\dhcpexport.xml -leases

This example import scopes with leases

Import-DhcpServer -ComputerName dhcpserver.mydomain.com -File C:\Temp\dhcpexport.xml -BackupPath C:\dhcpbackup\ -Leases

And i think the scopes is activated after the importation if i remember.

hth

This posting is provided AS IS without warranty of any kind


Thursday, April 21, 2016 3:00 AM

Hi,

Thanks for your reply. Does this command export the reservations as well ? Thanks


Thursday, April 21, 2016 5:22 AM

Everything! ;)

This posting is provided AS IS without warranty of any kind


Wednesday, November 30, 2016 12:20 PM

Export works on 2008r2, but import won't