Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Web Servers»IIS»How to Restart IIS via Command Line

    How to Restart IIS via Command Line

    By RahulMarch 29, 20232 Mins Read

    Internet Information Services (IIS) is a web server that runs on Microsoft Windows operating systems. IIS is a crucial component of many web-based applications, and it is necessary to know how to restart IIS when it malfunctions or needs updates. While restarting IIS can be done through the IIS Manager graphical user interface, it can also be performed using the command line interface. In this article, we will discuss how to restart IIS via the command line.

    Advertisement

    Step 1: Open Command Prompt

    To access the command line interface, you will need to open the Command Prompt. To do this, click the Windows Start button, search for “cmd”, and select the Command Prompt app from the search results.

    Step 2: Stop IIS

    To stop IIS, you will need to enter the following command in the Command Prompt:

    iisreset /stop 
    

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

    Stop IIS via command line

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

    Stop IIS via Run Window

    This command will stop all running IIS services.

    Step 3: Start IIS

    To start IIS, you will need to enter the following command in the Command Prompt:

    iisreset /start
    

    Start IIS via command line

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

    Start IIS via Run Window

    This command will start all IIS services that were stopped in the previous step.

    Step 4: Restart IIS

    Alternatively, you can restart IIS with a single command using the following:

    iisreset /restart
    

    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

    This command will both stop and start IIS services at the same time.

    Step 5: Verify IIS is running

    To ensure that IIS is running correctly, you can check its status by entering the following command in the Command Prompt:

    iisreset /status
    

    This command will display the current status of all IIS services.

    In conclusion, restarting IIS via the command line interface is a simple process that can be done using a few basic commands. By following these steps, you can quickly and easily restart IIS, which can help to resolve any issues that may be preventing your web-based applications from running correctly.

    iis iisreset
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    How to Recycle IIS Application Pool in Windows

    Setup Let's Encrypt SSL in IIS on Windows

    How to Install Let’s Encrypt SSL with IIS on Windows Server 2019

    How to Start and Stop All Sites in IIS

    View 6 Comments

    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

    Advertisement
    Recent Posts
    • A Comprehensive Look at the Simple Mail Transfer Protocol (SMTP)
    • Understanding Basic Git Workflow: Add, Commit, Push
    • The Difference Between Git Reset –soft, –mixed, and –hard
    • Understanding the Staging Area in Git’s Workflow
    • Python Function with Parameters, Return and Data Types
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

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