Setting Application Pool Via Command Line in IIS 7
I needed a way to set the default website's application pool in IIS 7 using the command line. I discovered this:
%systemroot%\system32\inetsrv\APPCMD set site "Default Web Site" /[path='/'].applicationPool:"ASP.NET v4.0"