Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between IISRESET and IIS Stop-Start command

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

like image 228
Sunny Avatar asked Feb 28 '14 01:02

Sunny


People also ask

What does Iisreset command do?

What does IISRESET do? IISRESET restarts all IIS services, shutting down any active IIS worker processes in the process and killing them if they do not stop in time. During the restart, the web server stops listening for incoming requests and causes downtime for all websites on the server.

What is the command to stop and start the IIS?

Using a command line If you want to stop IIS first, and then start it again, type iisreset /restart and press ENTER.

How do I stop a website from command line using IIS?

The Stop-IISSite cmdlet stops an existing site on the Internet Information Services (IIS) server.


2 Answers

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. 
like image 62
Baljeetsingh Avatar answered Oct 21 '22 11:10

Baljeetsingh


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.

like image 45
jewelhuq Avatar answered Oct 21 '22 12:10

jewelhuq