大网数据广告活动
网络与域名解析

Netsh utility to export and import DHCP scopes

· 52CE 我爱测

Describes how to use the Netsh utility to export and import DHCP scopes.

This article describes how to use the Netsh utility to export and import DHCP scopes.

Applies to:   All Windows Server versions
Original KB number:   281626

Summary

The Netsh.exe utility in Windows Server 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 "Access Denied" 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.

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

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

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

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
- Supported versions of Windows Server · Source date 02/12/2026
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。