A bit of background:
I am trying to start and stop some performance counters remotely at the beginning of the test, and then stop them at the end of the test. I do this from an automatic test environment from a Win2003 machine, the test environment executes commands without starting the console, some of the systems under test work with Win2008. I wrote scripts to select performance counters based on the roles assigned to the servers.
My problem (s):
logman cannot start or stop counters on machines that run a later version of the OS.psexec can be used to run logman remotely, but psexec likes to move periodically when it starts from the test environment. It works fine manually from the command line. I assume this is because the calling process does not provide the console or some similar awkwardness. I can not do it (GRRRR)- I wrote a PowerShell script that remotely starts logman using WMI
win32_process and is called from a script package, this works fine. However, the test environment solves the pass and fail scenarios based on %ERRORLEVEL% and the contents of stderr, but WMI win32_process does not give me access to any of them. Therefore, if the counters do not start, the test will plow anyway and spend all the time.
I am looking for a solution that will allow me to execute a program on a remote machine, check the program return code and / or pipe stderr back to the caller. For reasons of simplicity, you need to write it in the tools available in the Win32k3 box with vanilla. I would prefer not to use a collapsed collection of scripts that upload things to log files and then read them again.
Someone had a similar problem and solved it, or at least suggested it?
source share