Link to home
Start Free TrialLog in
Avatar of Darren Kattan
Darren KattanFlag for United States of America

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
taskkill /IM powershell.exe /F

Open in new window

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;

Open in new window

User generated imageWe 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
Avatar of Neil Russell
Neil Russell
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Jeremy Weisinger
Jeremy Weisinger

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jeremy Weisinger
Jeremy Weisinger

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.
Avatar of Darren Kattan

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.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial