Microsoft KB Archive/281626

= How to use the Netsh utility to export and import DHCP scopes =

Article ID: 281626

Article Last Modified on 2/27/2007

-

APPLIES TO


 * Microsoft Windows Server 2003, Standard x64 Edition
 * Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)

-



This article was previously published under Q281626



SUMMARY
The Netsh.exe utility in Windows Server 2003 contains two commands that are available for Dynamic Host Configuration Protocol (DHCP): export and import. You can use these commands to selectively export and import DHCP scopes.



MORE INFORMATION
You can use Netsh.exe to import and export DHCP scopes only if the active account is a member of the local Administrators group. If the active account belongs to the Domain Admins group, you may receive an &quot;Access Denied&quot; error message when you use Netsh.exe to import or to export. The Domain Admins group is a member of the built-in Administrators group.

Note If the dhcp import command or the export command fails when the user is not an explicit member of the local Administrators group, apply the following hotfix:

833167 A Volume Shadow Copy Service (VSS) update package is available for Windows Server 2003

For more information, click the following article number to view the article in the Microsoft Knowledge Base:

890480 &quot;Access denied&quot; error message when you use the &quot;netsh dhcp server import&quot; command to import a DHCP database from a Windows NT Server 4.0-based computer to a Windows Server 2003-based computer

To navigate to the DHCP commands in Netsh.exe, type the following from a Netsh command prompt, where  is the name of the DHCP server to be administered:

dhcp server \\ 

From the NETSH DHCP SERVER command prompt, you may then export and import scopes by following the examples below.

Export examples
The following command exports the full service configuration to the c:\Temp\Dhcpdb file:

export c:\temp\dhcpdb all

The following command exports the configuration that pertains to scopes 10.0.0.0 and 20.0.0.0 to the c:\Temp\Dhcpdb file:

export c:\temp\dhcpdb 10.0.0.0 20.0.0.0

Import examples
The following command imports the full configuration from the c:\Temp\Dhcpdb file:

import c:\temp\dhcpdb all

The following command imports the configuration pertaining to scopes 10.0.0.0 and 20.0.0.0 from the c:\Temp\Dhcpdb file:

import c:\temp\dhcpdb 10.0.0.0 20.0.0.0

Keywords: kbhowto kbnetwork KB281626

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.