Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stopping/starting an application pool and site on a server

I would like to write a script and run it from my local PC to stop and start an application pool and site that exists on a server.

Value of App Pool and Site - Test Value of server - SERVER1

Any guidance would be much appreciated.

like image 410
Rick Avatar asked Jul 27 '16 08:07

Rick


People also ask

How do I start and stop application pool?

For a service, open the navigation menu for the service, and then select Stop or Start. For an application pool, open Internet Information Services (IIS) Manager, expand the local computer and open Application Pools. Open the navigation menu and select Stop or Start.

How do I stop application pools?

How to Stop Application Pools Using the IIS Manager. On the Connections pane, expand the server node and click Application Pools to display all Application Pools. On the Application Pools page, select the application pool for the published application that is running. Click Stop to stop the application pool.

Does stopping IIS stop application pools?

1 Answer. Show activity on this post. Stopping a site does not stop the application pool associated with the site. In fact the worker process serving the site still exists and the code loaded in the worker process still exists.

How do I stop app pool from starting after reboot?

Thank you for reply. 2. Open "Basic Settings" and disable option "Start application pool immediately".


1 Answers

Run Command Prompt with Administrative rights, and type the following:

C:\Windows\System32\inetsrv\appcmd start apppool /apppool.name:"MYAPPPOOLNAME"

or use the stop command. You could save this in a batch file, but it must be executed with higher privileges.

For the application pool on a remote server, you could use PsExec:

Psexec \\{Computer Name of ISS7 Server} C:\Windows\System32\inetsrv\appcmd recycle apppool my-app-pool
like image 66
Daniel Minnaar Avatar answered Sep 19 '22 20:09

Daniel Minnaar