- Home
- Logging Guide
- How to reset IIS
How to reset IIS web servers
In this page
- What is iisreset?
- When to use iisreset?
- How to reset IIS
- Using Command Prompt
- Using IIS Manager
- Using Windows Services
- Using PowerShell
- How EventLog Analyzer helps monitor IIS web servers
The IIS reset operation performed using the iisreset command restarts all Microsoft IIS services. It completely reboots your entire web server, disrupting all websites and applications running on the server. It is often used to implement major changes or resolve complex issues.
The iisreset command shuts down and restarts essential services, including the World Wide Web Publishing Service, HTTP, and FTP services. This operation terminates all connections and resets worker processes, effectively clearing out issues like memory leaks, unresponsive services, or web application crashes.
IIS reset commands used for restarting IIS web servers
The iisreset command comes with various options, as illustrated below:
Command | Description | Ideal use case |
---|---|---|
iisreset | This stops and restarts all IIS services. | Use this for a quick, complete reset when all IIS services need to be restarted immediately. |
iisreset /noforce | This attempts to gracefully stop IIS services. If the services do not stop within the allotted time, the command fails and identifies the services that couldn't be stopped. This ensures a controlled shutdown and minimizes potential service disruptions. | Use this when a controlled, graceful shutdown is preferred to avoid potential service disruptions. |
iisreset /stop | This stops IIS services but does not restart them. | Use this when you need to stop IIS services temporarily but you don't want them to restart. |
iisreset /start | This starts IIS services that have been stopped. | Use this when IIS services are down and need to be restarted manually. |
iisreset /restart | This stops and then restarts IIS services and is equivalent to iisreset. | Use this to perform a full restart of IIS services. |
iisreset /status | This displays the current statuses of IIS services. | Use this when you want to check the current statuses of IIS services (running, stopped, etc.). |
iisreset /timeout | This changes the default timeout period (60 seconds) for stopping services before forcibly terminating them. | Use this when the default 60-second timeout period isn't sufficient for your environment. |
iisreset /rebootonerror | This reboots the server if iisreset encounters an error. | Use this in environments where system recovery from IIS failures is critical and should be automated. |
Methods to perform an IIS reset
IIS resets can be performed through Command Prompt, IIS Manager, Windows Services, or PowerShell. The IIS reset and IIS restart commands both aim to refresh IIS services, but iisreset is a broader command that affects all hosted services, while the IIS restart command can target specific sites or application pools.
Using Command Prompt
- Click the Start menu, then select Run. In the open box, type cmd and press Enter.
- To open Command Prompt with administrative privileges, right-click Command Prompt and select Run as administrator.
- Execute the iisreset command:
Syntax: iisreset
While resetting your IIS web server is a quick fix for many issues, it also brings downtime to all hosted websites and applications on the server. To avoid this, Microsoft suggests using the iisreset /noforc command.
Using IIS Manager
To reset IIS using the IIS Manager GUI
- To open IIS Manager, navigate to Control Panel > System and Security > Administrative Tools > Internet Information Services (IIS) Manager.
- Select the server or website you want to reset.
- On the right-hand Actions pane, click Restart.
Recycling application pools
If you only need to restart a specific web application, recycling the application pool is a less disruptive option.
- Open IIS Manager.
- Select Application Pools under the server node.
- Right-click the specific application pool and select Recycle.
Recycling affects only the web applications tied to that pool, avoiding a full IIS reset.
Using Windows Services
You can restart IIS services through the Windows Services management console (services.msc).
- To open the Services console, press Win + R, type services.msc, and press Enter.
- Right-click World Wide Web Publishing Service and select Restart.
- Right-click IIS Admin Service and select Restart.
Using PowerShell
PowerShell is another powerful tool for resetting IIS and is particularly useful for scripting and automation.
- Open PowerShell.
- Type the command iisreset to reset IIS.
For application pool restarts
To restart a specific application pool, run the following command:
Syntax: Restart-WebAppPool "YourAppPoolName"
When to use iisreset
- To apply configuration changes: After modifying IIS settings, such as SSL configurations, authentication methods, or URL Rewrite rules, resetting IIS is necessary for the changes to take effect.
- To resolve performance issues: When IIS services become unresponsive, or when server resources (CPU, memory, etc.) are being consumed heavily by IIS worker processes (w3wp.exe), a reset can free up resources and restart IIS in a fresh state.
- To handle application crashes: Web applications hosted on IIS sometimes crash due to bad code or misconfigurations. In such cases, restarting IIS will clear any bad requests or deadlocks, ensuring services resume without further manual intervention.
- To recover from service hang-ups: When the IIS Admin Service or other dependent services hang up, they may cause web requests to fail. A quick reset resolves these temporary hang-ups and gets your services running again.
- To schedule maintenance: During planned maintenance windows, you may need to perform an IIS reset to refresh system performance or apply server updates without needing a full server reboot.
Resetting IIS can be a quick fix for issues, but it's essential to understand the implications, especially on production servers. Alternatives like recycling application pools provide a more seamless way to handle updates with minimal downtime. Always evaluate your server's load and the user traffic before proceeding with a full IIS reset.
How ManageEngine EventLog Analyzer helps with IIS web server monitoring
ManageEngine EventLog Analyzer, comprehensive log management and IT compliance management software, centrally collects and parses IIS logs, making it easier to track and analyze events across your entire infrastructure. This powerful tool provides real-time visibility into the performance and health of your IIS web servers through real-time log monitoring and reporting.
This solution offers detailed reports that help you monitor server errors, response times, and traffic patterns, allowing you to quickly detect performance issues like high error rates or slowdowns. Additionally, its customizable reports and alerts make it easy to stay on top of performance metrics and security incidents, ensuring that your IIS web servers remain secure, compliant, and efficient.