Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| windows_networking [2022/04/12 12:21] – created mgupton | windows_networking [2023/10/09 22:47] (current) – mgupton | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| ====== Handy Commands ====== | ====== Handy Commands ====== | ||
| + | |||
| + | ===== List Listening Ports ===== | ||
| + | <code powershell> | ||
| + | Get-NetTCPConnection -state listen | Select-Object -Property *, | ||
| + | </ | ||
| + | |||
| + | |||
| + | =====Get host IP addresses===== | ||
| Example of getting all IPv4 IP Addresses with Powershell | Example of getting all IPv4 IP Addresses with Powershell | ||
| <code powershell> | <code powershell> | ||
| Get-NetIPAddress -AddressFamily ipv4 | foreach {$_.IPAddress} | Get-NetIPAddress -AddressFamily ipv4 | foreach {$_.IPAddress} | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | ipconfig /all | findstr /i ipv4 | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | ipconfig /all | sls ipv4 | ||
| + | </ | ||
| + | |||
| + | ===Get public IP=== | ||
| + | <code powershell> | ||
| + | (curl ifconfig.me).Content | ||
| + | </ | ||
| + | |||
| + | === Reset Network Stack === | ||
| + | < | ||
| + | netsh winsock reset | ||
| + | netsh int IP reset | ||
| + | ipconfig /flushdns | ||
| </ | </ | ||