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?
You can also change the Application Pool of any website using appcmd command. Use following command to change application pool of site example.com and set App Pool to myAppPool appcmd set site /site.name:example.com / [path='/'].applicationPool:myAppPool To change the Application Pool for a subdirectory URL use the following command.
Some tasks you can use AppCmd for are: Create and configure websites, applications, application pools and IIS virtual directories. Starting and stopping of sites, and recycling application pools. List currently running worker processes and examine currently executing requests
IIS App Pool used for grouping of sites to use similar configuration settings or prevent other applications to use resources of one application by other applications. Use one of below option as per your requirements Use the following command to create Application Pool named “myAppPool” with default settings of IIS.
Starting and stopping a website with AppCmd is as easy as that. Stop, start and recycle application pools. Besides stopping and starting a website, you can use AppCmd to stop an application pool, start an application pool or recycle an application pool (recycling gracefully stops and restarts the applications pool).
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With