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
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.