views:

168

answers:

1

Hi all,

I've wrote a small tool that lists all the app pools running on a box and allows you to start/ stop/ recycle them. I've used System.DirectoryServices.

Now I'm trying to get it to write out the ProcessID of each AppPool for use in another tool but I'm struggling to find where it is / how to access it. Does anyone have any pointers?

Thanks

A: 

I realize this isn't ADSI, but I would use appcmd to show the pools and their process id's...

appcmd list wp

WP "4404" (applicationPool:blah)
WP "6864" (applicationPool:blahblah)
WP "2976" (applicationPool:blahblahblah)

then parse the process id's from the result.

appcmd can be found in the system32\inetsrv directory.

legobuff