Win Net Commands
Win Net Commands
admin cmd
powershell Start-Process cmd -Verb runAs
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.
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).
32. nslookup
Used to query DNS servers and resolve domain names to IP addresses. It can be used
interactively or with a specified query.
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.
41. netsh advfirewall firewall set rule group="Remote Desktop" new enable=yes
Enables Remote Desktop firewall rules for remote access.
### 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.