Use Powershell and Slickrun to display w3wp info

If you have multiple pools running within IIS locally, you’ll see corresponding w3wp.exe processes in visual studio when you try to attach for debugging purposes.  One quick way to figure out *which* one is the w3wp that you need to attach to is to display the process id and application pool for all the w3wp processes on your machine.  There’s plenty of old-school way to do that, or you can use a powershell script such as this:

gwmi win32_process -filter “name=’w3wp.exe’” | format-table -autosize name,processId,commandLine

So, you could pop that into a powershell file and call that either via an old-school batch file – or….. you could use a command line utility such as SlickRun and in-line the command into a “MagicWord” (Slickrun-speak for a named command) like this:

magic.

 

Of  course, this is pretty simple too: http://www.ervinter.com/2009/04/23/get-process-id-from-multiple-application-pool-iisapp/

Advertisement

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.