If you want to debug the windows ps section. You will find the whole script for the agent in our Github:
agents/wnx/src/engine/providers/ps.cpp
The query is:
Get-WmiObject -Query "SELECT * from Win32_Process"
Measure-Command { Get-WmiObject -Query "SELECT * from Win32_Process" | foreach { $_.GetOwner().User }
Related articles