Export and Import DHCP Scope

I was researching how to change the Subnet Mask of a DHCP scope on a Windows 2008 server. It turns out you can’t change the subnet without deleting the scope and recreating it. If there are a lot of customizations to the scope, though, like reservations and scope options, it’s no easy task to delete and recreate the scope. Luckily I found one page that explains how to export the scope to a text file, make changes, and then reimport it. The whole process takes only a couple of minutes, and you end up with a deleted and rebuilt scope that has all your customizations intact.

WindowsTricks.in explains the commands.

Use the below command to export the scope configuration


C:\>netsh dhcp server \\”Server name” scope “scope subnet” dump>c:\dhcp.txt


C:\>netsh dhcp server \\Test01 scope dump>c:\dhcp.txt

That creates a text file you can edit to change the Subnet, and whatever else you want changed. Then you have to delete the scope from the DHCP manager, and reimport the text file to create a new scope with the settings you specified.

C:\>netsh exec c:\dhcp.txt

I did it and it was exactly as easy as it sounds. After renewing my lease, the clients had the new DHCP scope. In all, it was a painless operation.

4 Responses to "Export and Import DHCP Scope"

  • Dale says:
  • BIlly says:
  • sylwok says:
  • Jeff Brady says:
Leave a Comment