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
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.
精彩评论