Sylvia Else wrote:
> This is a re-post, of sorts, since my previous attempt seems to have vanished into the void - something that Thunderbird occasionally does to me.
FWIW I don't remember your previous attempt making it to anwhere I was looking.
> I was using a command in Windows Powershell and got this error > > Get-NetTCPConnection: No matching MSFT_NetTCPConnection objects found by CIM query for instances of the ROOT/StandardCimv2/MSFT_NetTCPConnection class on the  CIM server: SELECT * FROM MSFT_NetTCPConnection  WHERE ((State = 2)) AND ((OwningProcess = 99310)). Verify query parameters and retry. > > This was an attempt to get the network ports on which a process is listening. > > And it's doing an SQL query to achieve that? Are you for real?
Not Microsoft's fault, the DMTF produced the CIM and WBEM standards, that's where the SQL-a-like query language comes from. Microsoft implemented them as WMI on Windows, then later stacked Powershell cmdlets on top of that.