Running
Get-WmiObject -Query "SELECT * FROM MSFT_NetTCPConnection where localport=443" -namespace "root\StandardCIMV2"
locally gives a list of data that is very big. I have been able to reduce it by grouping:
Get-WmiObject -Query "SELECT * FROM MSFT_NetTCPConnection where localport=443" -namespace "root\StandardCIMV2" | Group-Object LocalPort
Wondering though how can I do it efficiently with the WMI v2 extensions ?
BTW, the idea is to have metrics for the number of established web connections (I'll probably filter additionally by state...).