Some Most Important Commands for Windows Networking
Some Most Important Commands for Windows Networking
- To quickly reset your NIC back to DHCP with no manual settings, run this command:
C:\Windows> netsh int ip reset all
- To quickly generate a text summary of your system, run this command:C:\Windows>
systeminfo | more
- To see all network connections your client has open, run this command:
C:\Windows> net use
- To see all network share enable on the system, run this command:
C:\Windows> net share
- To see your routing table, run either of these commands:
C:\Windows>route print
C:\Windows>netstat -r
- Need to run a trace, but don’t have Netmon or Wireshark, and aren’t allowed to install either one? Run this command:
C:\Windows>
To Stop Trace
C:\Windows> netsh trace stop
- To quickly open a port on
the firewall, run this command, changing the name, protocol, and port to suit.
This example opens
syslog :
C:\Windows> netsh firewall set
portopening udp 161 syslog enable all
- To add an entry to your routing table that will be permanent, run the route add command with the –p option. Omitting that, the entry will be lost at next reboot:
C:\Windows> route add 0.0.0.0 mask
0.0.0.0 172.16.250.5 –p
- Here’s a simple way to see all open network connections, refreshing every second:
C:\Windows>netstat –ano 1
- You can add a |
ndstrfiv alue to watch for only a specific connection, like a client IP.adds or port:
C:\Windows>netstat –ano | findstr
216.134.217.20
- You can use the shutdown to shutdown or reboot a machine, including your own, in a simple scheduled task like this:
C:\Windows>shutdown –r –t 0 –m \\localhost
- You can use this to track the
ip address or domain name of a site.
C:\Windows>nslookup
Important Tips:
To make planned DNS changes go faster, reduce the TTL on the DNS records you plan on changing to 30 seconds the day before changes are to be made. You can set the TTL back to normal after you confirm the changes have been successful.
Set a short lease on DHCP scopes that service, laptops, and set Microsoft Option 002 to release a DHCP lease on shutdown. This helps to ensure your scope is not exhausted and that machines can easily get on another network when the move to a new site.
If you have any queries and any one want any help in scripting or in enhanced scripts please email me.
Suggestions and Queries are always welcome.
Comments
Post a Comment