Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
windows_networking [2022/05/05 14:26] mguptonwindows_networking [2023/10/09 22:47] (current) mgupton
Line 2: Line 2:
  
 ====== Handy Commands ====== ====== Handy Commands ======
-===Get host IP addresses===+ 
 +===== List Listening Ports  ===== 
 +<code powershell> 
 +Get-NetTCPConnection -state listen | Select-Object -Property *,@{'Name' = 'ProcessName';'Expression'={(Get-Process -Id $_.OwningProcess).Name}} | select-object OwningProcess,ProcessName,LocalPort 
 +</code> 
 + 
 + 
 +=====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>
Line 10: Line 17:
 <code> <code>
 ipconfig /all | findstr /i ipv4 ipconfig /all | findstr /i ipv4
 +</code>
 +
 +<code>
 +ipconfig /all | sls ipv4
 </code> </code>
  
Line 15: Line 26:
 <code powershell> <code powershell>
 (curl ifconfig.me).Content (curl ifconfig.me).Content
 +</code>
 +
 +=== Reset Network Stack ===
 +<code>
 +netsh winsock reset
 +netsh int IP reset
 +ipconfig /flushdns
 </code> </code>
  
  • windows_networking.1651760798.txt.gz
  • Last modified: 2022/05/05 14:26
  • by mgupton