Skip to content

Instantly share code, notes, and snippets.

@ShinNoNoir
Created September 12, 2017 06:34
Show Gist options
  • Save ShinNoNoir/4ddbbf5542cc5fd8405ff2222e82ed66 to your computer and use it in GitHub Desktop.
Save ShinNoNoir/4ddbbf5542cc5fd8405ff2222e82ed66 to your computer and use it in GitHub Desktop.
Netstat wrapper in PowerShell
# from: https://blogs.technet.microsoft.com/heyscriptingguy/2015/08/19/parsing-netstat-information-with-powershell-5/
function ns {
return (netstat -ano).trim() | select -Skip 4 | ConvertFrom-String -PropertyNames Protocol,LocalAddress,RemoteAddress,State,Process
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment