All technical articles

netsh on Windows Server: Checking IP, DNS and Firewall from the Command Line

A practical tour of netsh commands to view network settings and firewall state and to reset the network stack on Windows Server, with the necessary cautions.

netsh on Windows Server: Checking IP, DNS and Firewall from the Command Line

When you have no graphical access to a Windows Server or need to check several servers quickly, netsh is an old but useful tool. It shows interface settings, firewall rules and proxy state from the command line.

1. View interface settings

Run this as Administrator to see the IP and DNS registered on each interface:

netsh interface ip show config

2. Firewall state

You can see whether the firewall is on for each profile. This command only displays and changes nothing:

netsh advfirewall show allprofiles state

3. Resetting the stack: with care

A reset command may return network settings to defaults and needs a reboot. If you are connected over RDP, make sure you have another way in such as a console, because the connection may drop:

netsh winsock reset

4. Illustrative example, not a measurement

Suppose (an illustrative case) the site is unreachable from outside after an IP change. netsh output shows the correct address but the Public profile firewall is on without an inbound rule for port 443.

5. Common mistakes

  • Running a reset remotely without a fallback way in.
  • Running commands without Administrator rights.
  • Changing a firewall rule without recording the previous state.

6. Frequently asked questions

Is netsh deprecated? Parts of it moved to PowerShell, but it still works on many versions.

How do I save the output? Redirect it with > into a text file so you have a copy before changing anything.

7. Quick checklist

  1. Open CMD or PowerShell as Administrator.
  2. Save the interface settings.
  3. Check the firewall state.
  4. Confirm a fallback access path before any reset.

If you need help reviewing performance or maintaining a server, see the server management services.

More server and WordPress guides are collected in the article archive.

Official references

Microsoft netsh contexts · Microsoft netsh command reference