Skip to content

Instantly share code, notes, and snippets.

@dgosbell
Last active May 11, 2023 12:50
Show Gist options
  • Save dgosbell/2ac348a40b9d32759a78fff59512b7b8 to your computer and use it in GitHub Desktop.
Save dgosbell/2ac348a40b9d32759a78fff59512b7b8 to your computer and use it in GitHub Desktop.
$process = "MSMDSRV"
get-process -name $process | % {get-nettcpconnection -OwningProcess $_.id} | select-object @{Name="Process"; Expression = {$Process}},LocalPort, RemotePort, OwningProcess
$process = "PBIDesktop"
get-process -name $process | % {get-nettcpconnection -OwningProcess $_.id} | select-object @{Name="Process"; Expression = {$Process}},LocalPort, RemotePort, OwningProcess
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment