Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Web Servers»IIS»How to Restart IIS via Command Line

    How to Restart IIS via Command Line

    RahulBy RahulFebruary 25, 20152 Mins ReadUpdated:May 6, 2020

    We have two options to Start, Stop to Restart IIS service on windows. You can do it directly from the Windows services center or you can do it directly via the command line.

    To do this you must have Administrative access to your system. Open Windows command prompt “run as Administrator” and follow the below instructions.

    If you are directly logged in with the Administrator account you can run the same commands through run Window in your Windows system.

    1. Start IIS via Command Line

    Use following command to start IIS service on Windows operating systems. Either use Windows command prompt to run this command or execute it from run window.

    To start IIS on command line, Open terminal and type:

    c:/> iisreset /start
    

    Start IIS command line

    Press WIN + R to open Run window. Type the same command on run window and press enter:

    Start IIS Run Window

    2. Stop IIS via Command Line:

    Use following command to stop IIS service on Windows operating systems. Either use Windows command prompt to run this command or execute it from run window.

    c:/> iisreset /stop
    

    To stop IIS on command line, open terminal and type:

    Stop IIS command line

    Press WIN + R to open Run window. Type the same command on run window and press enter:

    Stop IIS Run Window

    3. ReStart IIS via Command Line:

    Use the following command to restart IIS service on Windows operating systems. Either use the Windows command prompt to run this command or execute it from the run window.

    c:/> iisreset /restart
    
    [or]
    
    c:/> iisreset
    

    Default iisreset command restarts the IIS service. So you don’t need to provide /restart parameter option to iisreset command to restart IIS service.

    To restart IIS on command line, open terminal and type:

    restart-iis-run

    Press WIN + R to open Run window. Type the same command on run window and press enter:

    restart-iis

    iis iisreset
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticlePHP – Loop Between Two Dates
    Next Article How to Install IIS on Windows 8

    Related Posts

    How to Setup Let’s Encrypt SSL in Windows IIS

    Updated:August 28, 20213 Mins Read

    How to Start and Stop All Sites in IIS

    Updated:March 22, 20201 Min Read

    How to Redirect HTTP to HTTPS in IIS

    Updated:April 1, 20202 Mins Read

    How to Setup Reverse Proxy on IIS with URL-Rewrite

    Updated:July 3, 20182 Mins Read

    How to Enable URL Rewrite in IIS

    Updated:February 27, 20202 Mins Read

    How To Install IIS on Windows 10

    Updated:August 6, 20212 Mins Read

    6 Comments

    1. zedmelon on September 20, 2021 11:17 pm

      Prathima (or anyone curious about the same), hope you’ve gotten your answer by now.
      But if not…

      You’ll need to write a small script that runs the iisreset command. Just a quick line or two like this will work:
      @echo off
      c:\Windows\system32\iisreset.exe /restart

      Another script could check on the status of the web server periodically, seeking a specific page. You can even target one that’s not publicly linked, such as
      /TellMeWhenThisSiteIsDown.html

      Put the web check script in your Task Scheduler. Once an hour, every five minutes, whatever. If the page loads properly, the script exits; if it finds errors, it then runs the restart script.

      A “quick and dumb” way to do this would be to simply run the restart script each day when you expect no clients (e.g. 3am).
      The disadvantage of course is that it would disconnect / log out anyone who happened to be visiting at the time of the restart (INCLUDING other automated processes relying on the web server), which is of course not ideal. But it also can be written, scheduled, and done in two minutes. So for a low-volume site that still needs to remain available… it’s an option.

      Reply
    2. John Prevette on October 1, 2019 6:51 pm

      Your picture under “Stop” and “Start” are backwards (they don’t sync with the text)

      Reply
    3. Srikanth on September 17, 2019 7:54 am

      How we can stop remotely from other server as a batch or powershell ?

      Reply
    4. Rendra on August 6, 2017 1:01 am

      Thanks a lot, it saved my day 🙂
      I can’t start my wampp server because it’s IIS service still online.

      Reply
    5. Prathima on April 4, 2017 1:13 pm

      Hi ,
      Can you please help me is there a way to automate this process to perform iisreset when one of the services is down ?

      Reply
    6. LEAVE A REPLY on November 20, 2015 12:17 pm

      Hello Thanks Post To This Article. Its Working And use to easily..

      Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • How to Install Sublime Text 4 on Ubuntu 22.04
    • How to Enable / disable Firewall in Windows
    • How to Install JAVA on Ubuntu 22.04
    • Switching Display Manager in Ubuntu – GDM, LightDM & SDDM
    • Changing the Login Screen Background in Ubuntu 22.04 & 20.04
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.