Posts Tagged “IISreset”

This step-by-step article describes how to use Iisreset.exe and Task Scheduler to schedule Internet Information Services (IIS) 5.0 and 6.0 to restart.

To schedule IIS to restart on the local computer, follow these steps:

1. Click Start, point to Settings, and then click Control Panel.

2. Double-click Scheduled Tasks.

3. Double-click Add Scheduled Task, and then click Next.

4. Click Browse, navigate to the %SystemRoot%\System32 folder, click Iisreset.exe, and then click Open.

5. Either accept the default name that is displayed in the Type a name for this task box or type the name that you want to use.

6. Under Perform this task, click the interval that you want to use for this task, and then click Next.
7. If you chose to schedule a daily task, a weekly task, a monthly task, or a task that runs only one time in step 6, specify the time and the day when you want the task to run, and then click Next.

8. Type the user name and the password of a user account in which you want to run the task, and then click Next.

This account must be a member of the Administrators group. You must type the user name by using the following format, where domain is the domain name and username is the user account in which you want to schedule the task:

domain\username

9. Click to select the Open advanced properties for this task when I click Finish check box, and then click Finish.

10. Click the Task tab.

11. At the end of the command line that is displayed in the Run box, insert a space, type /restart, and then click OK.

For example, to stop and restart IIS services on the local computer, the command line that is displayed in the Run box should look similar to the following command line, where drive is the drive on which Windows is installed:

drive:\winnt\system32\iisreset.exe /restart

NOTE: You can use other Iisreset.exe parameters in combination with /restart. For example, to restart the computer if an error occurs less than one minute after the Internet services attempt to start, use the /rebootonerror parameter and the /timeout:value parameter. In this scenario, the command line that is displayed in the Run box looks similar to the following command line:
drive:\winnt\system32\iisreset.exe /restart /rebootonerror /timeout:60

Alternatively, if you want to schedule the computer to restart, use the /reboot parameter. In this scenario, the command line that is displayed in the Run box looks similar to the following command line:
drive:\winnt\system32\iisreset.exe /reboot

12. Verify that the new task is displayed in the Scheduled Tasks window, and then close the Scheduled Tasks window.

Tags: , ,

Comments No Comments »