WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: warren on August 05, 2013, 07:25:18 AM

Title: How to get iis sessions?
Post by: warren on August 05, 2013, 07:25:18 AM
Does anyone know how to get the current number of IIS (win2008) sessions in use? I'm creating an app to get the sessions every x minutes and then display them in a graph to track site usage.

Thanks!
Title: Re: How to get iis sessions?
Post by: td on August 05, 2013, 01:27:43 PM
Assuming that you are using IIS 7.0, you should be able to get the information using the AppCmd.exe command line utility.  Docs for the utility should be on your server and additional information can be found here

http://www.iis.net/learn/get-started/getting-started-with-iis/getting-started-with-appcmdexe#Finding

You could also try using a PowerShell script via WinBath's dotNet hosting to get the performance counter information that is collected on IIS usage.   I haven't played with the IIS counters so I don't have any examples handy.

Perhaps someone else has a simpler solution.