I am trying to find out which web sites are running an application pool. MicrosoftIISv2/WebServerSetting only offers AppPoolId property and all of the valuse are DefaultAppPool . I can see all of these application pools are running different web sites on IIS. How can I get the web sites running on an application pool by WMI?
I am trying to find out which web sites are running an application pool.
Share
I found out it can be done with
EnumAppsInPoolmethod. Here’s the code:And the string extensions taken from here and here