When working with IIS 6.0 it was pretty handy to use the iisapp VbScript to find out which w3wp worker process relates to which Application Pool. In IIS7, this script doesn’t work anymore. There is a replacement though. You can add the command below to a batch file and just call it:
%windir%\system32\inetsrv\appcmd.exe list wp