You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Noticing that the get-netstat command uses the netstat.exe binary. Calling that binary not being a bad way and parsing what is on the screen, however if you use the Get-WmiObject win32_process it has most of the information we are trying to get to sans the username. That in conjunction with the Get-NetTcpConnection cmdlet provides the same information. I have made a sample out on my repo.
Some things I may have overlooked,
I am not sure when get-net* was implemented so it may not be available in PS v2
It's not currently the prettiest code it was written to be a one line tool for rapid deployment
Agree the netstat screen scrapping is awful and doesn't work for non-English versions of Windows. A while back I wrote a version that would do this using PSReflect, but given that triggers lots of AV, I decided not to release it. I'd welcome your contribution, if you want to submit a PR or if you're granting permission, I can copy and paste your code and add a new collector.
Noticing that the get-netstat command uses the netstat.exe binary. Calling that binary not being a bad way and parsing what is on the screen, however if you use the Get-WmiObject win32_process it has most of the information we are trying to get to sans the username. That in conjunction with the Get-NetTcpConnection cmdlet provides the same information. I have made a sample out on my repo.
Some things I may have overlooked,
I am not sure when get-net* was implemented so it may not be available in PS v2
It's not currently the prettiest code it was written to be a one line tool for rapid deployment
https://github.com/mwilco03/GPSBL/blob/master/Get-NetStatObject
If this is interesting I'd be happy to help contribute.
The text was updated successfully, but these errors were encountered: