zoukankan      html  css  js  c++  java
  • IIS的启动与停止命令

    IIS的启动与停止命令

    IIS启动 net start w3svc

    IIS停止 net stop iisreset

    DOS下IIS服务命令:

    可以通过iisreset /?命令来查看

    iisreset /reboot 重启win2k计算机(但有提示系统将重启信息出现)

    iisreset /startstop启动(停止)所有Internet服务

    iisreset /restart停止然后重新启动所有Internet服务

    iisreset /status 显示所有Internet服务状态

    iisreset /enabledisable 在本地系统上启用(禁用)Internet服务的重新启动

    iisreset /rebootonerror 当启动、停止或重新启动Internet服务时,若发生错误将重新开机

    iisreset /noforce 若无法停止Internet服务,将不会强制终止Internet服务 
    iisreset /timeout Val在到达逾时间(秒)时,仍未停止Internet服务,若指定/rebootonerror参数,则电脑将会重新开机。预设值为重新启动20秒,停止60秒,重新开机0秒。

    批处理

    这些批处理需要管理员权限执行

    关闭服务

    把下面代码存为stop.bat

    @echo off
    
    net stop w3svc
    net stop iisadmin
    net stop msftpsvc 
    • 1
    • 2
    • 3
    • 4
    • 5

    启动服务

    把下面代码存为stat.bat

    @echo off
    net start iisadmin
    net start w3svc
    net start msftpsvc  
    • 1
    • 2
    • 3
    • 4

    延时一段时间后重新启动IIS

    在工作中,需要把IIS停止延时一段时间后重新启动IIS。

    @echo off
    iisreset /stop
    echo %time%
    choice /t 60 /d y /n >nul
    echo %time%
    choice /t 5 /d y /n >nul
    iisreset /start
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7

    保存为IIS_STOP.bat

    如果是重新启动没有延时,直接用IISRESET即可。

  • 相关阅读:
    Solution: Win 10 和 Ubuntu 16.04 LTS双系统, Win 10 不能从grub启动
    在Ubuntu上如何往fcitx里添加输入法
    LaTeX 笔记---Q&A
    Hong Kong Regional Online Preliminary 2016 C. Classrooms
    Codeforces 711E ZS and The Birthday Paradox
    poj 2342 anniversary party
    poj 1088 滑雪
    poj 2479 maximum sum
    poj 2481 cows
    poj 2352 stars
  • 原文地址:https://www.cnblogs.com/guoxibaijv/p/11550300.html
Copyright © 2011-2022 走看看