【发布时间】:2014-03-31 19:54:29
【问题描述】:
命令 iisreset 和 iisreset /stop 后跟 iisreset /start 之间有什么区别吗?
【问题讨论】:
-
大概
iisreset命令的默认操作是停止服务,然后启动它。/stop和/start开关只是做其中之一。
标签: windows batch-file iis command-line command
命令 iisreset 和 iisreset /stop 后跟 iisreset /start 之间有什么区别吗?
【问题讨论】:
iisreset 命令的默认操作是停止服务,然后启动它。 /stop 和 /start 开关只是做其中之一。
标签: windows batch-file iis command-line command
将 IISReset 作为一套命令,帮助您管理 IIS 启动/停止等。
这意味着您需要指定选项 (/switch) 来执行任何操作。
默认行为或默认开关是/restart 和iisreset,因此您不需要使用/start 和/stop 运行两次命令。
希望这能澄清您的问题。 iisreset /? 的输出供参考:
IISRESET.EXE (c) Microsoft Corp. 1998-2005 Usage: iisreset [computername] /RESTART Stop and then restart all Internet services. /START Start all Internet services. /STOP Stop all Internet services. /REBOOT Reboot the computer. /REBOOTONERROR Reboot the computer if an error occurs when starting, stopping, or restarting Internet services. /NOFORCE Do not forcefully terminate Internet services if attempting to stop them gracefully fails. /TIMEOUT:val Specify the timeout value ( in seconds ) to wait for a successful stop of Internet services. On expiration of this timeout the computer can be rebooted if the /REBOOTONERROR parameter is specified. The default value is 20s for restart, 60s for stop, and 0s for reboot. /STATUS Display the status of all Internet services. /ENABLE Enable restarting of Internet Services on the local system. /DISABLE Disable restarting of Internet Services on the local system.
【讨论】:
iisreset 与 net stop w3svc/net start w3svc 有什么区别?
以下内容已针对 IIS 8.5 和 Windows 8.1 进行了测试。
从 IIS 7 开始,Windows recommends restarting IIS via net stop/start。通过命令提示符(以管理员身份):
> net stop WAS
> net start W3SVC
net stop WAS 也将停止 W3SVC。然后在启动时,net start W3SVC 将启动 WAS 作为依赖项。
【讨论】:
net stop iisadmin 给我“服务名称无效。”仅重置 w3svc 就足够了吗? restting w3svc` 和运行 iisreset 有什么区别?
IISAdmin 有什么意义?仅重置 w3svc 似乎可以正常工作。
我知道这是一篇相当老的帖子,但我想为将来阅读它的人指出以下几点: 根据 MS:
请勿使用 IISReset.exe 工具重新启动 IIS 服务。反而, 使用 NET STOP 和 NET START 命令。例如,停止并 启动万维网发布服务,运行以下命令 命令:
- NET STOP iisadmin /y
- NET START w3svc
使用 NET STOP/NET START 命令有两个好处 重新启动 IIS 服务,而不是使用 IISReset.exe 工具。 首先,IIS 配置更改可能在 IISReset.exe命令运行时保存的过程为 丢失。二、使用IISReset.exe会让人难以识别 出现此问题时,哪些依赖服务或服务未能停止 发生。使用 NET STOP 命令停止每个独立的依赖 service 将允许您识别哪个服务未能停止,因此您 然后可以相应地对其故障进行故障排除。
【讨论】: