-1

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?

Terrance Jackson
  • 606
  • 3
  • 13
  • 40
  • I don't have IIS available to me so I'm not comfortable making this an answer, but can you `appcmd set app -app.name:MyApp -applicationPool:AppPool2`? – SomethingDark Aug 18 '22 at 16:29
  • All operations you do in IIS Manager can be done via command line (mostly via PowerShell cmdlets), so possibility is never a question. About how to, you should start from search engines. – Lex Li Aug 18 '22 at 16:43

1 Answers1

2

Try this:

C:\Windows\System32\inetsrv>appcmd set app "Default Web Site/MyApp" /applicationPool:AppPool2
Vasya
  • 469
  • 2
  • 6