powershellbatch-fileiisiis-7application-pool

Is it possible to move an application to a new app pool with a batch file?


Lets say I have a website called "MyApp" that exists on the wwwroot folder in iis. I also have an app pool called "AppPool2" that I want to move "MyApp" to this app pool.

Is it possible to my my website to AppPool2 with a bat file or a powershell command?


Solution

  • Try this:

    C:\Windows\System32\inetsrv>appcmd set app "Default Web Site/MyApp" /applicationPool:AppPool2