Skip to content

Feature Request: Use WMI object to collect netstat information  #207

@mwilco03

Description

@mwilco03

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions