I’m currently managing a Citrix-farm system based on Windows Server 2008R2. In the past, I had used a Powershell script to check for running user-processes and restart them if necessary.
I used the tool “tasklist.exe” with additional parameters to check if a defined process is running under the logged-on user. Unfortunately the tasklist.exe had stopped working for a few days now. Restarting it results in an error message:
“Error: Not found” or “Error: invalid class”.
Since the servers are in Germany, I have translated the message from German to English. On the German server, it’s called
“Fehler: Nicht gefunden” and “Fehler: Ungultige Klasse”.
So, I’m not sure if the translation to English is correct. There are no error logs in the event log.
As it is a production system, there have been no changes such as updates and there is no internet connection.
Is it possible that a dll registration is missing? I’ve check with “depends.exe” for anything that might be amiss but I’m not able to identify any difference between a working server and the non-working server.
I’ve also checked if there are any errors when starting “dcomcnfg” but everything is ok.
A fresh copy of tasklist.exe from a working server did not work. The problem isn't related to the exectuable itself.
The hint provided under this link was checked with a non positiv result.
Virus pattern are up-to-date (McAfee VDS 8.8 + ASE 8.8).
Does anybody have any suggestions on how I can get “tasklist.exe” running again? Alternatively, I would like a solution with Powershell commands that would help rebuild the functions of “tasklist.exe” – it’s not an easy task as I’m not the best scripter.
Thanks in advance for your help, hints or suggestions!
Indeed the problem was related to the WMI. The hint from Ryan Ries to check the WMI with
resulted in a similar error when trying to connect.
In this case I received an error code with which I was able to find the solution at Microsoft TechNet.
The script listed in that page didn´t work for me but the command
So thank you Ryan for the WMI hint and thank you r.tanner.f for the workaround in case everything else didn’t work.