How to create an application pool with appcmd?

Houman picture Houman · Nov 26, 2011 · Viewed 14.3k times · Source

I have figured out I could associate an existing application pool with an existing site like this:

APPCMD.exe set app "sitename/" /applicationPool:"appPoolName"

But how do I create my own application pool with the name appPoolName, .NET version 4 and Integrated pipeline prior to this command?

Answer

Jeremy McGee picture Jeremy McGee · Nov 26, 2011

This:

https://docs.microsoft.com/en-us/iis/get-started/getting-started-with-iis/getting-started-with-appcmdexe

should give you everything you need. In particular

appcmd add apppool /name:appPoolName /managedRuntimeVersion:"v4.0" /managedPipelineMode:"Integrated"

should do the job.