Skip to content

Instantly share code, notes, and snippets.

@dfinke
Created January 5, 2015 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dfinke/d42494923a11d778dc57 to your computer and use it in GitHub Desktop.
Save dfinke/d42494923a11d778dc57 to your computer and use it in GitHub Desktop.
function mynetstat {
$t=@"
Proto Local Address Foreign Address State
{Proto*:TCP} {Address:0.0.0.0:80} {FA:my-laptop:0} {State:LISTENING}
TCP 0.0.0.0:135 my-laptop:0 LISTENING
TCP 192.168.0.6:139 my-laptop:0 LISTENING
{Proto*:TCP} 192.168.0.6:1128 a23-209-83-52:https {State:CLOSE_WAIT}
"@
$data | cfs -TemplateContent $t | select * -ExcludeProperty ExtentText
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment