IISRESET is a command-line tool in Windows 2000 that stops, unloads, reloads, and restarts the IIS process and all its attendant components on demand. It is useful as a way to kill and relaunch IIS in many circumstances: as part of a regularly-scheduled batch operation, as a way to insure that Registry and Metabase changes take hold, and as a response to performance monitor alerts in the event of an extreme memory leak.

Using IISRESET is simple enough. Type IISRESET from a command line, followed by a machine name or IP address if you are resetting a machine remotely. The program will respond with prompts that tell you the progress of the reset, which can take up to a couple of minutes in some cases. The default timeout period is 20 seconds for a restart, 60 seconds for a stop, and zero for a reboot, although you can modify these parameters.

You can also invoke IISRESET with a variety of switches. The default is /RESTART, which stops and then restarts all IIS services. If the services have been stopped and you want to start them again, use /START; if you want to just stop them with no restart, use /STOP.

Rreboot the system through IISRESET by using the /REBOOT switch. If you use /REBOOTONERROR, the system will reboot only if the stop/restart of IIS does not take place gracefully.

The /NOFORCE switch tells the program not to force the termination of the IIS processes; if the process does not terminate by itself, gracefully,

    Requires Free Membership to View

then the program logs and error and quits.

/TIMEOUT:

/STATUS reports back on the status of all loaded IIS services:

Status for World Wide Web Publishing Service ( W3SVC ) : Running
Status for FTP Publishing Service ( MSFTPSVC ) : Running

/ENABLE and /DISABLE allow you to enable and disabled the running of IIS on the system. This is useful if you are trying to debug something and want IIS to shut down and stay down through a reboot.

IISRESET can be used to kill and restart IIS in the event of a memory leakage alert. To set something like this up, right-click on My Computer, select Manage, go to Performance Logs and Alerts, and create a new alert. Add the appropriate system counter to monitor, such as system memory or processor time. Under the Action tab, select Run This Program and add IISRESET with the appropriate switches. In the same way, you can make IISRESET part of a scheduled batch job. (Note that if IIS is leaking memory on a regular basis, there may be a severe problem that needs to be addressed by adding Service Packs or updating either MDAC or the Scripting Engine.)


Serdar Yegulalp is the editor of the Windows 2000 Power Users Newsletter.


This was first published in September 2002

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.