停止/启动服务器上的应用程序池和站点 [英] Stopping/starting an application pool and site on a server

查看:86
本文介绍了停止/启动服务器上的应用程序池和站点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想编写一个脚本并从本地PC运行它,以停止和启动服务器上存在的应用程序池和站点。

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.

应用程序的值池和站点-测试
服务器的值-SERVER1

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

任何指导将不胜感激。

推荐答案

以管理权限运行命令提示符,然后键入以下内容:

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

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

或使用 stop 命令。您可以将其保存在批处理文件中,但是必须以更高的特权执行。

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

对于远程服务器上的应用程序池,可以使用PsExec

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

这篇关于停止/启动服务器上的应用程序池和站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆