[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More


IIS 6 AppPool Worker Process Monitoring and Recovery with SCOM and Orchestrator

Published on
11,215 Points
1 Endorsement
Last Modified:
Hi Everyone

Now IIS AppPool issues is something we have always had because of the amazing custom development and in-house applications we have :)

The issues we had were getting out of control and it was time to do something about it, just for my sanity.

The problem was that we had our worker processes running high CPU and there were a lot of them and the support teams needed a way to see which worker processes belonged to which application pool as well as have some way of recycling these automatically at the same time sending out a mail notification about which application pool was recycled and when.

So I created a custom SCOM management pack to collect the worker process CPU usage as well as which W3WP.exe ID was tied to which AppPool and then plot this in a performance view as well as create a consecutive samples monitor to alert when these worker processes were over 85% for 2 samples or more.

Below is a screen shot of one of the alerts:
Worker Process AlertWhat I also did, was create a "recovery" script to fire off a Orchestrator Runbook so that I could automatically recycle that specific application pool for them and then send them a mail with all the same details.

Below is the actual Runbook
Recycle AppPool
Simple !

The Runbook "Initialize Data" accepts the 2 parameters "Server" and "AppPoolName" this is then passed to the "Recycle App Pools" activity which runs the PowerShell script that will recycle that specific application pool.

$Server = "ServerName"
$AppPoolName = "AppPoolName"
$iisVersion = Get-ItemProperty "HKLM:\software\microsoft\InetStp";
if ($iisVersion.MajorVersion -eq 7)

$Name = "W3SVC/APPPOOLS/$AppPoolName"
$Path = "IISApplicationPool.Name='$Name'"
Invoke-WMIMethod Recycle -Path $Path -Computer $Server -Namespace root\MicrosoftIISv2 -Authentication PacketPrivacy
$appPool = get-wmiobject -namespace "root\MicrosoftIISv2" -class "IIsApplicationPool" | Where-Object {$_.Name -eq "W3SVC/APPPOOLS/$AppPoolName"}

Open in new window

The normal things can be done to create your views in SCOM so that the guys can look at the performance view of their specific servers AppPools as well as Alerts as per the normal setup you would do.

If you would like any more info on this simple process or any questions, please feel free.

Thank you

Featured Post

JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

There are many cases found where ScanPST.exe fails to repair corrupt Outlook PST File. When user tries to repair PST using Inbox Repair tool and it throws below error: •      Inbox Repair tool does not recognize the file •      ScanPST.exe hangs in betwee…
I've published three five-minute Experts Exchange video Micro Tutorials that describe terrific features in an excellent, free PDF product called PDF-XChange Editor: How to rotate pages in a PDF with free software (https://www.experts-exchange.com…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month