Use Netsh commands to backup and restore network settings

  
        

Netsh is a command-line scripting utility provided by the Windows 2000/XP/2003 operating system itself that allows users to display or modify the network configuration of a currently running computer locally or remotely. To archive, back up, or configure other servers, Netsh can also save configuration scripts in a text file.

Running the Netsh Command

There are two cases to run the Netsh command.

1. Run the Netsh command locally

Click “Start→Run”, enter the Cmd command in the Run dialog box and click [OK], then enter the Netsh command at the command prompt. It is.

2. Run the Netsh command remotely

To run the Netsh command on a remote Windows Server server, first use the "Remote Desktop Connection" to connect to the Windows Server server running Terminal Services, after The operation is the same as using the Netsh command locally.

Backup/Restore

Server Network Settings

When it comes to network settings, you will definitely think of IP address, subnet mask, gateway, DNS, etc. (These are mainly interfaces IP configuration parameters). For a normal computer, the network settings only have interface IP configuration parameters; for the server, the network settings include not only the interface IP configuration parameters mentioned above, but also interface configuration, port proxy configuration, remote access configuration, and routing configuration. , DNS proxy configuration, NAT configuration, DHCP relay agent configuration, and more. The above network setting parameters vary according to the special role that the server plays in the network. For example, if the Windows 2000 Server server in the campus network is responsible for connecting to the external network and connecting multiple subnets in the campus, then it must be on the server. Set up remote access configuration, routing configuration, DNS proxy configuration, and NAT configuration.

1. Backup Server Network Settings

One of the most frequent tasks an experienced network administrator does is backup. Only backups can be made, and when devastating damage is encountered, the network can be restored quickly and in a timely manner. Network settings backup operation: netsh dump >bak12.txt, through this operation can back up the network settings to the bak12.txt file, which is a text file.

After making adjustments to the network settings, you should make a backup immediately.

2. Recovering the server's network settings

When making network settings adjustments, if an operation error occurs or the server network fails, you can use the backup to quickly restore the network settings. Method of operation: netsh exec bak12.txt.

Backing up the server network settings with the Netsh command is especially simple and convenient, and it is fast and efficient. It does not require other software assistance. It is very suitable for network administrators to backup and restore the server network settings.

Copyright © Windows knowledge All Rights Reserved