Darren Kattan
asked on
Windows Server 2012 Exchange 2013 Powershell spawns new process every hour and consumes lots of CPU
This only appears to be happening on the Windows Server 2012 (non-R2) Exchange 2013 servers we manage.
Every hour a new Powershell instance starts and begins hanging the CPU. Over the course of time dozens of these Powershell.exe instances get created, and there is always one at the top consuming a ton of CPU. If I kill that process, another one comes to life and begins consuming a ton of CPU. The only way to get it to stop is to
But with time they will come creeping back. If I look in Process Explorer, each Powershell instance is hosted by conhost.exe (which might be normal)
Also in Process Explorer, I see that the command it is trying to run is
Powershell works fine when you run it at the console of the machine, so it appears that this is only happening when Powershell is executed in a non-interactive mode.
Every hour a new Powershell instance starts and begins hanging the CPU. Over the course of time dozens of these Powershell.exe instances get created, and there is always one at the top consuming a ton of CPU. If I kill that process, another one comes to life and begins consuming a ton of CPU. The only way to get it to stop is to
taskkill /IM powershell.exe /F
and it kills all the Powershell instances. But with time they will come creeping back. If I look in Process Explorer, each Powershell instance is hosted by conhost.exe (which might be normal)
Also in Process Explorer, I see that the command it is trying to run is
powershell.exe "Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAcount SilentlyContinue;get-spfarm | select Products;
We use a monitoring tool called LabTech and I notice that this also happens when I deploy scripts to these machines via LabTech.Powershell works fine when you run it at the console of the machine, so it appears that this is only happening when Powershell is executed in a non-interactive mode.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I think the Labtech software has issues. It shouldn't be running commands for products that are not installed. It must be misidentifying what is on the system. That is most likely the cause of the problem.
ASKER
Jeremy, that begs the question, how else is it supposed to figure out what is on the system?
That command, when run in normal context, does not hang the system. It just errors out. LabTech interprets that (correctly) as to mean that Sharepoint is not installed.
That command, when run in normal context, does not hang the system. It just errors out. LabTech interprets that (correctly) as to mean that Sharepoint is not installed.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.