I try to use PerformanceCounter to monitor remote server information in a domain environment, like:
var counter = new PerformanceCounter("PhysicalDisk", "Disk Bytes/sec", "_Total", "REMOTE_SERVER");
there is only 1 line of code, running the above code will wait at least 50 seconds.
I tried to impersonate the admin etc, still same time.
I also tried with PowerShell get-counter, still more or less speed.
I tried with windows native Performance Monitoring Tool in computer management, connect to remote server, takes a few second only.
Any idea how to improve the connection speed?