13.16 IISRestartServer

Use this Knowledge Script to stop and then restart an IIS server. This script raises events if the attempt to stop or restart a service fails or succeeds. You can detect and start any service that was stopped abruptly.

13.16.1 Resource Objects

Windows 2003 Server or later

13.16.2 Setting Parameter Values

Set the following parameters as needed:

Parameter

How to Set It

Event Notification

Raise event if attempt to restart server succeeds?

Select Yes to raise an event if the attempt to restart the IIS server succeeds. The default is Yes.

Event severity if operation succeeds

Set the severity level, from 1 to 40, to indicate the importance of the event. The default is 25 (blue event indicator).

Raise event if attempt to restart server fails?

Select Yes to raise an event if the attempt to restart the IIS server fails. The default is Yes.

Event severity if server start fails

Set the severity level, from 1 to 40, to indicate the importance of the event. This Knowledge script raises this event when the attempt to start the IIS server fails. The default is 5 (red event indicator).

Event severity if server stop fails

Set the severity level, from 1 to 40, to indicate the importance of the event. This Knowledge script raises this event when the attempt to stop the IIS server fails. The default is 5 (red event indicator).

Event severity for unexpected error

Set the event severity level, from 1 to 40, to indicate the importance of the event. The default is 35 (magenta level indicator).

This script raises an event for unexpected script errors. For example, if a script aborts before the job starts or during the job, an event is raised.

Administration

Restart the server?

Select Yes to restart the IIS server, after it is stopped. The default is Yes.

Service start/stop delay

Set the number of seconds to wait after the IIS server is stopped before attempting to automatically restart it. The default waiting time is 30 seconds.

Restart dependent services?

Select Yes to restart any services that depend on the server you stopped. The default is Yes.

Service start/stop retry count

Set the number of times to attempt to restart a service after it has stopped. The script attempts to restart a service 3 times (default).