I want an application or script that displays the following:
Worker process, App pool name, memory usage, and optionally cpu usage.
I am familiar with using
%windir%\system32\inetsrv\appcmd.exe list wp
but this just gets me the workerproces id and the app pool name. I then take that and cross reference taskmanager. This works, but I would like a quicker – almost dashboard like display of the information. I imagine there must be some sort of solution that shows the information without needing to click around like process explorer. Anyone have something in particular they use? Would this be possible in powershell?
Best Answer
If you don't have IIS 7 and the provider, you can use WMI. The attached script works for most of your requirements, except CPU usage. Save the below script as get-webserverapppoolstats.ps1 (or whatever you want).
You can run the script then with:
./Get-WebServerAppPoolStats.ps1 'Server1', 'Server2', 'Server3' -IntegratedAuthentication OR Get-Content servers.txt | ./Get-WebServerAppPoolStats.ps1 -IntegratedAuthentication