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 RahulMay 6, 20202 Mins Read

    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.

    Advertisement

    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

    Related Posts

    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

    Redirect to HTTPS in IIS

    How to Redirect HTTP to HTTPS 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
    • How to Split Large Archives in Linux using the Command Line
    • System.out.println() Method in Java: A Beginner’s Guide
    • Split Command in Linux With Examples (Split Large Files)
    • Test Your Internet Speed from the Linux Terminal
    • 11 Practical Example of cat Command in Linux
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

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