The information in this article applies to:
SUMMARYMicrosoft Internet Information Services (IIS) version 5.0 adds a new command-line utility, Iisreset.exe, which can be used to restart IIS or schedule restarting your computer. MORE INFORMATION
Iisreset.exe is designed to easily allow Web administrators to take a server offline or recycle services through the command line, the Task Scheduler, or batch commands that perform additional tasks.
IISRESET [computer name] [/option] [/option] [(and so on)]The default behavior if no options are specified is to stop and restart the Web services on the local computer. Iisreset.exe supports the following command-line parameters: /RESTART /START /STOP /REBOOT /REBOOTONERROR /NOFORCE /TIMEOUT:val /STATUS /ENABLE /DISABLEExamples: The following command will attempt to restart all running Web services and reboot the computer if the command is not successful for any reason: IISRESET /RESTART /REBOOTONERRORThis following will attempt to restart all running Web services, yet if either the stop or restart commands are not successful within two minutes, the computer will restart: IISRESET /RESTART /TIMEOUT:120 /REBOOTONERRORThe purpose of the following commands, when saved to a batch file, is to stop all running Web services, copy the log files for the default Web server to a backup directory on the D: drive, and then start all Web services. However, if the stop command fails for some reason, it will not shut down the services, but simply exit the batch file: @echo offAny of the preceding examples can be scheduled to run during non-peak hours for your server using Task Scheduler. For more information on how to accomplish this, search for Task Scheduler in Windows Help. Additional query words: iis
Keywords : |
Last Reviewed: February 2, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |