Difference between IISRESET and IIS Stop-Start command

258,743

Solution 1

Take IISReset as a suite of commands that helps you manage IIS start / stop etc.

Which means you need to specify option (/switch) what you want to do to carry any operation.

Default behavior OR default switch is /restart with iisreset so you do not need to run command twice with /start and /stop.

Hope this clarifies your question. For reference the output of iisreset /? is:

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.

Solution 2

The following was tested for IIS 8.5 and Windows 8.1.

As of IIS 7, Windows recommends restarting IIS via net stop/start. Via the command prompt (as Administrator):

> net stop WAS
> net start W3SVC

net stop WAS will stop W3SVC as well. Then when starting, net start W3SVC will start WAS as a dependency.

Solution 3

I know this is quite an old post, but I would like to point out the following for people who will read it in the future: As per MS:

Do not use the IISReset.exe tool to restart the IIS services. Instead, use the NET STOP and NET START commands. For example, to stop and start the World Wide Web Publishing Service, run the following commands:

  • NET STOP iisadmin /y
  • NET START w3svc

There are two benefits to using the NET STOP/NET START commands to restart the IIS Services as opposed to using the IISReset.exe tool. First, it is possible for IIS configuration changes that are in the process of being saved when the IISReset.exe command is run to be lost. Second, using IISReset.exe can make it difficult to identify which dependent service or services failed to stop when this problem occurs. Using the NET STOP commands to stop each individual dependent service will allow you to identify which service fails to stop, so you can then troubleshoot its failure accordingly.

KB:https://support.microsoft.com/en-ca/help/969864/using-iisreset-exe-to-restart-internet-information-services-iis-result

Share:
258,743

Related videos on Youtube

Sunny
Author by

Sunny

Software Engineer #SOreadytohelp

Updated on July 05, 2022

Comments

  • Sunny
    Sunny almost 2 years

    Is there any difference between commands iisreset and iisreset /stop followed by iisreset /start ?

    • unclemeat
      unclemeat about 10 years
      Presumably iisreset command has the default action of stopping the service, then starting it. The /stop and /start switches just do one or the other.
  • Sunny
    Sunny about 10 years
    @Baljeet..I was under the impression that there might be any hidden difference between these two commands, but I think thats not the case.
  • Baljeetsingh
    Baljeetsingh almost 9 years
    you should add answer that explains more details on the how they are different , alternate commands doesn't answer the question.
  • jewelhuq
    jewelhuq almost 9 years
    This is the simplest way. i do not think it needed to be explain.
  • Pacerier
    Pacerier over 8 years
    @jewelhuq, First line works but net stop iisadmin gives me "The service name is invalid." Is is sufficient to only reset w3svc ? What's the difference between restting w3svc` and running iisreset?
  • Pacerier
    Pacerier over 8 years
    @Baljeetsingh, What's the difference between iisreset vs net stop w3svc/net start w3svc?
  • Baljeetsingh
    Baljeetsingh over 8 years
    @Pacerier read here its well explained blogs.msdn.com/b/sudeepg/archive/2009/02/14/… and this as well jnjnboo.wordpress.com/2009/05/27/… .. happy learning
  • Pacerier
    Pacerier over 8 years
    @Baljeetsingh, Good link, but after reading it: What's the point of resetting IISAdmin? Resetting only w3svc seems to work fine.
  • Dan Randolph
    Dan Randolph about 8 years
    @Pacerier, the point of restarting IISAdmin is that sudeepg is duplicating the button functions in IIS manager: "Open IIS Manager and then select the server node. In the right side pane, you will have an option to restart IIS."
  • Baljeetsingh
    Baljeetsingh about 8 years
    @Pacerier Sorry, I am not quite sure on that .
  • Saroop Trivedi
    Saroop Trivedi almost 5 years
    @Baljeetsingh: there is minor different. If you perform IISreset rather then stop and start. It is not realizing memory on server. In my daily activity we need to follow the process with stop and start because if your server utilize 80 to 92% memory then you need to wait until your memory utilization graph goes down. that time you need to perform -stop and-start. Some time we need to wait more than 10min for releasing memory.