How to restart an IIS web server

In this page

  • Methods to restart an IIS web server
  • Actions to take after restarting IIS
  • How EventLog Analyzer supports web server restarts

You may need to restart the IIS web service to apply configuration changes, such as updates to application pool security settings or server variables. Restarting an IIS web server also ensures that updates or patches are fully implemented and can resolve issues like application crashes, hangs, or configuration conflicts, giving the server a fresh start to address transient problems. To avoid web outages, schedule your IIS restarts wisely.

This article elaborates on the different ways of safely restarting an IIS web server.

Note

A note before you restart your IIS web server

1. Backup considerations

Before restarting IIS, it’s a good practice to back up your configurations. This ensures you can quickly revert to a previous state if needed. Here’s how you can do a quick backup:

  • Open IIS Manager.
  • Go to Server Certificates and export any custom certificates, if applicable.
    Use the ApplicationHost.config file for backup, found at %windir%\System32\inetsrv\config.

2. Assessing impact

Restarting IIS will cause temporary downtime, which might affect users accessing your web applications. Communicate with stakeholders and users about the planned restart to minimize disruptions.

Methods to restart an IIS web server

To restart IIS, you can use multiple methods depending on your preference or environment. Whether through the graphical IIS Manager or a command line with tools like AppCmd, each method efficiently restarts the web server to apply configuration changes.

1. To restart IIS using IIS Manager

  • Open IIS Manager from the Start menu or by executing inetmgr in the Run prompt.
  • In the Connections pane, select your server node.
  • In the Actions pane on the right, under Manage server, click Restart.
  • Confirm the action if prompted. IIS will perform a graceful restart, reloading all configurations and settings.

2. Using a command line (AppCmd)

  • Open Command Prompt with administrative privileges. To do this, right-click Command Prompt and select Run as administrator.
  • Execute the iisreset command:
  • iisreset
  • This command stops and then restarts the IIS services. The process may take a few moments, and you’ll receive a confirmation once it’s complete.
  • Suggested reading: Refer to the steps for starting and stopping IIS web services in this article.

3. Using PowerShell

  • Open PowerShell with administrative privileges.
  • Use the Restart-Service cmdlet to restart the IIS services:
  • Restart-Service -Name W3SVC
  • This command restarts the World Wide Web Publishing Service (W3SVC), which is essential for IIS operations.

4. Using Windows services

  • Open the Services management console by typing services.msc in the Run dialog or the Start menu.
  • Locate World Wide Web Publishing Service in the list.
  • Right-click it and select Restart. This will stop and start the service, applying any changes or updates.

Steps to be followed after IIS web server restarts

  • To avoid web outages, ensure your IIS web service is running by checking its status in IIS Manager or by using the iisreset command.
  • Access your web applications to confirm they are working correctly and that no configuration issues have arisen.
  • If there's an issue, examine the logs located at %SystemDrive%\inetpub\logs\LogFiles for any errors or warnings.
  • Keep an eye on system performance metrics to identify any anomalies or issues that might need further investigation.

How ManageEngine EventLog Analyzer monitors IIS web server system audits

ManageEngine EventLog Analyzer, a comprehensive log management and IT compliance solution, helps monitor IIS servers' health and performance. It monitors crucial system events, such as unexpected shutdowns, restarts, application errors, service failures, and resource constraints, that can impact performance. The solution helps you centrally collect, analyze, correlate, search, and archive log data for effective troubleshooting, security, and compliance purposes.

EventLog Analyzer comes with predefined monitoring reports on web server starts, stops, and restarts, providing insights on when the operation was performed, who initiated it, and from where. The solution also helps identify performance bottlenecks, including high CPU usage, memory shortages, and disk I/O issues, which may necessitate a restart.

With this log management solution, you can correlate IIS web server logs with network logs to detect early threats and potential security risks. EventLog Analyzer aggregates historical web server data to allow for trend analysis, identifying recurring problems that might require more permanent fixes

What's next?

Interested in learning more about how EventLog Analyzer can help with IIS web server monitoring and ensure its security? Explore the 30-day, free trial now.