windows IISRESET 和 IIS 停止-启动命令的区别

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22084561/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 11:25:09  来源:igfitidea点击:

Difference between IISRESET and IIS Stop-Start command

windowsbatch-fileiiscommand-linecommand

提问by Sunny

Is there any difference between commands iisresetand iisreset /stopfollowed by iisreset /start?

命令iisresetiisreset /stop后跟有什么区别iisreset /start吗?

回答by Baljeetsingh

Take IISReset as a suite of commands that helps you manage IIS start / stop etc.

将 IISReset 作为一组命令,帮助您管理 IIS 启动/停止等。

Which means you need to specify option (/switch) what you want to do to carry any operation.

这意味着您需要指定选项 ( /switch) 来执行任何操作。

Default behavior OR default switch is /restartwith iisresetso you do not need to run command twice with /startand /stop.

默认行为或默认开关为/restartwith,iisreset因此您无需使用/startand运行命令两次/stop

Hope this clarifies your question. Check this MS DOS help picture you will understand.

希望这能澄清你的问题。检查此 MS DOS 帮助图片您将了解。

enter image description here

在此处输入图片说明

回答by jewelhuq

The following was tested for IIS 8.5 and Windows 8.1.

以下内容针对 IIS 8.5 和 Windows 8.1 进行了测试。

As of IIS 7, Windows recommends restarting IIS via net stop/start. Via the command prompt (as Administrator):

从 IIS 7 开始,Windows建议通过net stop/start. 通过命令提示符(作为管理员):

> net stop WAS
> net start W3SVC

net stop WASwill stop W3SVCas well. Then when starting, net start W3SVCwill start WASas a dependency.

net stop WAS也会停止W3SVC。然后在启动时,net start W3SVCWAS作为依赖项启动。