Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Windows Server 2016-three ways to back up and restore DHCP servers

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Method 1: restore DHCP by graphical backup:

Backup operation:

In the 1.DHCP console, select the "backup" option in the properties:

two。 Specify the backup path. The default is C:\ Windows\ System32\ dhcp\

3. After the backup is complete, view the backup information:

Restore DHCP information:

In the a.DHCP console, select the restore option in the properties:

b. Specify the corresponding configuration file location:

c. Select Yes in the pop-up window to continue:

d. Prompt that the service needs to be restarted. Choose to continue:

e. The data restore is complete, the point is determined.

Note: for authorization, don't forget to authorize the DHCP operation.

Method 2: netsh backup and restore DHCP:

1. Command line export DHCP configuration:

Netsh dhcp server export c:\ dhcpbak\ dhcp.txt all

two。 The command line imports the DHCP restore configuration:

Netsh dhcp server import c:\ dhcpbak\ dhcp.txt all

Command comments:

C:\ Windows\ system32 > netsh dhcp /? list-lists all available commands. Help-displays help. ?-displays help. Add-adds configuration items to the table. Delete-removes a configuration item from the table. Show-displays information. Server [\ servername/ipaddress]-switches the context to the specified server. A null value means it is a local machine. C:\ Windows\ system32 > netsh dhcp Server /? Switches the contents of the command in use to the specified DHCP server. Syntax: dhcp > server parameter: the NetBIOS or DNS name of the ServerName-DHCP server computer. ServerIP-the IP address of the DHCP server computer. Note: if you do not specify a value for ServerName or ServerIP, the system assumes that you want to use the local computer. Example: server\\ DHCP-SRV1 server\\ dhcp-srv.microsoft.com server 10.0.0.1

Method 3: powershell backup and restore DHCP

1. Export some DHCP configuration information:

Export-DHCPServer-File "$env:temp\ dhcpsettings.xml"-Computername NPS03

two。 Import DHCP configuration information on the new server:

Import-DhcpServer-ComputerName new.abc.com-File C:\ exports\ dhcpexport.xml-BackupPath C:\ dhcpbackup\

Welcome to the official account of Wechat: Xiao Wen study Society.

Command comments:

Export-DhcpServer [- File] [- ScopeId] [- Prefix] [- Leases] [- Force] [- ComputerName] [- CimSession] [- WhatIf] [- Confirm] [] if you specify the ScopeId or Prefix parameter, only the specified range or prefix and all server-level settings are exported. If neither ScopeId nor Prefix is specified, the DHCP server service configuration (including all ranges, V4 and V6, and optional lease data) is exported. If you specify the Leases parameter, lease data is exported in addition to the configuration data. Example 1: export all DHCP configurations Export-DhcpServer-ComputerName "dhcpserver.contoso.com"-File "C:\ exportdir\ dhcpexport.xml" Import-DhcpServer [- File] [- BackupPath] [- CimSession] [- ComputerName] [- Force] [- Leases] [- Prefix] [- ScopeId] [- ScopeOverwrite] [- ServerConfigOnly] [] if ScopeId or Prefix parameters are specified, or ScopeId and Prefix parameters are specified, only the specified range or prefix will be imported. If the ScopeId and Prefix parameters are not specified, all configurations contained in the file and any optional lease data are imported. If the Leases parameter is specified, the lease data from the specified file is imported in addition to the configuration data. If the ScopeOverWrite parameter is specified and the scope being imported exists on the target server, the scope on the target DHCP server service is overwritten. If this parameter is not specified and the scope being imported exists on the target DHCP server service, a warning message appears that the import will continue to process the next scope being imported. If the ServerConfigOnly parameter is specified, the server-level configuration is imported only on the target DHCP server service. If the specified file contains any scope information, the same information is not imported on the target DHCP server service.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report