Created
September 12, 2017 06:34
-
-
Save ShinNoNoir/4ddbbf5542cc5fd8405ff2222e82ed66 to your computer and use it in GitHub Desktop.
Netstat wrapper in PowerShell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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