Stopping/starting an application pool and site on a server

谁都会走 提交于 2019-12-07 04:54:50

问题


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.


回答1:


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


来源:https://stackoverflow.com/questions/38607537/stopping-starting-an-application-pool-and-site-on-a-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!