0% found this document useful (0 votes)
4 views

Win Net Commands

The document provides a comprehensive list of Windows network commands, detailing their functions and usage. Key commands include managing network interfaces, configuring IP settings, and monitoring network connections. It also covers advanced features like firewall rules, routing, and DNS configurations.

Uploaded by

red0deviloo7
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Win Net Commands

The document provides a comprehensive list of Windows network commands, detailing their functions and usage. Key commands include managing network interfaces, configuring IP settings, and monitoring network connections. It also covers advanced features like firewall rules, routing, and DNS configurations.

Uploaded by

red0deviloo7
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

win net commands

admin cmd
powershell Start-Process cmd -Verb runAs

1. netsh interface ipv6 show address


Displays detailed information about IPv6 addresses configured on all network
interfaces.

2. netsh interface set interface "Ethernet" admin=disable


Disables a network interface (Ethernet in this case) using netsh. Re-enable it
using admin=enable.

3. netsh interface ip set address name="Local Area Connection" static <IP> <subnet
mask> <default gateway>
Manually sets a static IP address for a network interface.

4. netsh wlan show interfaces


Shows detailed information about the Wi-Fi interface, including signal strength, IP
address, and more.

5. route add <destination> mask <subnet mask> <gateway>


Adds a new route to the routing table. This is a powerful command to alter the
network routing behavior on your computer.

6. netsh advfirewall firewall add rule name="Allow RDP" protocol=TCP dir=in


localport=3389 action=allow
Adds a firewall rule to allow incoming RDP traffic (port 3389).

7. ping -l <size> -f <destination>


Performs a ping test with a custom packet size and the "Don't Fragment" flag set.
Useful for testing the Maximum Transmission Unit (MTU) of a network.

8. telnet <hostname> <port>


Attempts to connect to a specific port on a remote system. This can be used to
verify if a service (like HTTP or FTP) is reachable on the network.

9. netsh interface ipv4 set subinterface "Ethernet" mtu=1492 store=persistent


Changes the Maximum Transmission Unit (MTU) size for an interface, which can be
helpful for resolving network fragmentation issues.

10. netsh advfirewall set allprofiles state off


Disables the Windows Firewall completely. Useful for troubleshooting but should be
used with caution as it leaves the system vulnerable.

11. netstat -s -p tcp


Shows detailed statistics of all TCP connections. This can help identify issues
with connection states or traffic patterns.

12. netstat -an | findstr :<port_number>


Filters the active connections list to show only those using a specific port
number. For example, netstat -an | findstr :80 will show HTTP traffic.

13. nmap <IP range or hostname>


Although not a native Windows command, Nmap is a very powerful external network
scanning tool that works well for scanning hosts, open ports, and service versions
on a network.

14. wmic nicconfig where (IPEnabled=true) call SetDNSServerSearchOrder(<DNS IPs>)


Configures DNS servers for all enabled network interfaces via WMI.

15. Get-NetAdapterAdvancedProperty -Name "Ethernet"


Displays advanced network adapter settings and properties. Can be used to check and
modify parameters like TCP Offloading, Jumbo Frames, etc.

16. powershell Get-NetAdapterBinding -Name "Ethernet"


Retrieves network bindings for specific network interfaces, which tells you which
protocols (like IPv4 or IPv6) are enabled on a given interface.

17. Get-WmiObject Win32_NetworkAdapterConfiguration | Select-Object -Property


IPAddress, DefaultIPGateway, DNSServerSearchOrder
Retrieves detailed network configuration information (including IP address, default
gateway, and DNS servers) via WMI.

18. netsh interface ip reset


Resets the entire TCP/IP stack to default settings, which can help resolve
networking issues caused by corruption or misconfiguration.

19. netsh interface ipv4 add route <destination> mask <subnet mask> <gateway>
[metric=<value>]
Adds a new route to the system's IPv4 routing table. Useful for advanced network
management.

20. Get-NetIPInterface
Displays information about each network interface, including the status and
configuration of IP interfaces (IPv4 and IPv6).

21. netsh wlan set hostednetwork mode=allow ssid=<NetworkName> key=<Password>


Configures your Windows device as a wireless access point, allowing you to share
your internet connection.

22. Get-NetTCPConnection | where {$_.State -eq 'Listen'}


Lists all TCP connections that are in the listening state. Useful for finding
services that are waiting for incoming connections.

23. tracert -d <destination>


Traces the route to a destination without resolving IP addresses to hostnames,
which can speed up the trace process.

24. netsh interface ipv4 set global taskoffload=disabled


Disables offloading features for the network adapter. This can be useful when
troubleshooting issues with network performance.

25. powershell Set-NetIPInterface -InterfaceAlias "Ethernet" -Dhcp Enabled


Configures a network interface to use DHCP for obtaining an IP address.

26. netsh interface ipv4 show subinterface


Displays the statistics for all network interfaces on your system, including MTU
and packet statistics.

27. netstat -anob


Displays active connections and listening ports with the executable involved. It
can also show the executable's name using -ob option (only works in administrator
mode).

28. ipconfig /flushdns


Clears the DNS resolver cache. This command can be useful for resolving issues
related to DNS lookups.
29. arp -a
Displays the Address Resolution Protocol (ARP) cache, which maps IP addresses to
MAC addresses on the local network.

30. route print


Displays the IP routing table. You can use this command to view network paths and
routes.

31. traceroot -h <max_hops> <destination>


Traces the route to a destination with a specified maximum number of hops.

32. nslookup
Used to query DNS servers and resolve domain names to IP addresses. It can be used
interactively or with a specified query.

33.netsh wlan show profiles


Displays all Wi-Fi profiles that have been saved on the system.

34. netsh wlan show profile name="<Wi-Fi profile>" key=clear


Displays the password for a Wi-Fi network stored on your computer. (Use with
caution as it shows sensitive information.)

35. nbtstat -A <IP Address>


Displays NetBIOS information about a remote computer using its IP address.

36. ping -t <destination>


Pings a network device indefinitely until manually stopped (Ctrl+C). Useful for
checking continuous connectivity.

37. telnet <IP or domain> <port>


Tests if a port on a remote server is open. It can be helpful to test services like
HTTP, FTP, etc.

38. netstat -s
Displays detailed statistics for network protocols, such as TCP, UDP, and IP.

39. getmac
Displays the MAC addresses of the network interfaces on your system.

40. netsh int ipv4 reset


Resets all TCP/IP stack settings to their default values. This is useful for fixing
networking issues related to the TCP/IP protocol.

41. netsh advfirewall firewall set rule group="Remote Desktop" new enable=yes
Enables Remote Desktop firewall rules for remote access.

42. wmic nicconfig get caption, IPAddress, MACAddress


Retrieves detailed network interface configuration details using WMI (Windows
Management Instrumentation).

43. powershell Get-NetTCPConnection


Lists all current TCP connections with detailed information.

44. netsh interface set interface "Ethernet" disable


Disables a specific network interface by name.

45. powershell Get-NetAdapterStatistics


Provides detailed statistics for all network adapters on the system.
To view the routing table in an operating system, you can use the following
commands:

### On Windows:
```cmd
route print
```

### On Linux/macOS:
```bash
netstat -r
```
or
```bash
ip route show
```

These commands will display the routing table, showing how network traffic is
directed based on destination addresses.

You might also like