开发者

Get an application pool's Process ID using ADSI

开发者 https://www.devze.com 2022-12-12 19:21 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消