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.


Use the below command to export the scope configuration
Syntax:
C:\>netsh dhcp server \\”Server name” scope “scope subnet” dump>c:\dhcp.txt
Example:
C:\>netsh dhcp server \\Test01 scope 192.168.1.0 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.

Comments

Popular posts from this blog

Changes in Windows 2008 Active Directory

Windows Server Support Interview Questions and Answers (L1)

How to Write a Letter Requesting Sponsorship