cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
hirogen
Engaged Sweeper III
So they're closing all the ports down apart from the ones like sql and a few applications they know are critical, just wondering under applications if there's a way to record the ports which are used by those applications, I've asked controlup they don't do it, I know of tcpip/view from sysinternals but obviously not looking to try on multiple machines with all the various apps out there...
1 ACCEPTED SOLUTION
grimstar
Champion Sweeper II
hirogen wrote:
So they're closing all the ports down apart from the ones like sql and a few applications they know are critical, just wondering under applications if there's a way to record the ports which are used by those applications, I've asked controlup they don't do it, I know of tcpip/view from sysinternals but obviously not looking to try on multiple machines with all the various apps out there...


I'm not sure I can think of a way to get the information in to Lansweeper, but I can think of a way to export current connections to a file for you to review and then take whatever additional action on it you see fit. I cannot take full credit for the script below.

Get-NetTCPConnection | select-object LocalAddress,LocalPort,RemoteAddress,RemotePort,State,@{Name="Process";Expression={(Get-Process -Id $_.OwningProcess).ProcessName}},@{n="UserName";e={(Get-Process -Id $_.OwningProcess -IncludeUserName).UserName}} | Export-Csv -Path "[ExportLocation]" -NoTypeInformation


View solution in original post

1 REPLY 1
grimstar
Champion Sweeper II
hirogen wrote:
So they're closing all the ports down apart from the ones like sql and a few applications they know are critical, just wondering under applications if there's a way to record the ports which are used by those applications, I've asked controlup they don't do it, I know of tcpip/view from sysinternals but obviously not looking to try on multiple machines with all the various apps out there...


I'm not sure I can think of a way to get the information in to Lansweeper, but I can think of a way to export current connections to a file for you to review and then take whatever additional action on it you see fit. I cannot take full credit for the script below.

Get-NetTCPConnection | select-object LocalAddress,LocalPort,RemoteAddress,RemotePort,State,@{Name="Process";Expression={(Get-Process -Id $_.OwningProcess).ProcessName}},@{n="UserName";e={(Get-Process -Id $_.OwningProcess -IncludeUserName).UserName}} | Export-Csv -Path "[ExportLocation]" -NoTypeInformation


New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now