Newer versions of Exchange Server are getting more dependent on the web services. Several features and integrations rely on the web services in Exchange Server, like Outlook Web Access (OWA), Offline Address Book (OAB), Exchange Admin Center (EAC), Outlook Anywhere, and others. Sometimes, due to various reasons, you need to restart the Internet Information Services (IIS) on Exchange Server.
In this article, we will be going through the process of restarting the underlying Internet Information Services (IIS) on Exchange Servers.
Why would you need to restart the Exchange Server IIS?
There could be many reasons why you would need to restart the web services of the Exchange Server. Some common reasons are:
- Installation or renewal of server certificates
- Maintenance work
- Setting up of two-factor authentication with Google or other suppliers
- Issues on the server
How to Restart IIS on Exchange Servers?
Here are the ways to restart Internet Information Services on Exchange Servers.
Restart Exchange Server IIS from Internet Information Services (IIS) Manager
You can restart the services through both the Graphical User Interface (GUI) and PowerShell. If you want to use the Internet Information Services interface approach, then you need to perform the following procedure:
- Click onStart.
- Click onWindows Administrative Tools.
Note:In older versions (2016 and earlier), you need to go to Control Panel > Administrative Tools.
- When the new pop-up opens, double-click on theInternet Information Services (IIS) Manager
- This will open theApplication Server Managerfor the web services.
- Right-click on the server’s name (in this case, it is SRV01) and click onStop.
- In the right pane, you can see that the service is stopped. All web-related services for Exchange will not work as this service hosts several Exchange Server services (see the extract below).
- Now to start the service, you just need to click onStart.
- To check if the services are running, you can try to open theOutlook Web Access(OWA) of your server. If all goes well, the system will work.
- Alternatively, you can highlight the server and click on theRestart.
Restart Exchange Server IIS from Services Control Panel
You can also restart the web services from theServicescontrol panel in your computer. To do this, follow the given procedure:
Right-click onStartand click onRun.
- In the Run window, enterservices.mscto open theServicescontrol panel and clickOK.
- Scroll down to find theWorld Wide Web Publishing Service.
- Highlight the service and click on theRestartthe service
Alternatively, you can run the service in Command Prompt. Follow these steps:
- Right-click on Start and click on Run.
- In the Run window, typeCMDand pressEnter.
- In the command prompt, run the following command:
NET STOP W3SVC
- To start the service, enter the following command:
NET START W3SVC
Restart the Exchange Server IIS Remotely for Several Servers
If you have a数据库可用性组(DAG)setup, you could have three or more servers in your setup. You cannot access them all one-by-one and run the command because you might miss one of them or forget to start the service. So, to automate the process on all servers remotely, you can use PowerShell. Here’s the process to restart IIS for several servers using PowerShell:
- InExchange Management Shell (EMS), run theGet-ExchangeServercommand to get the list of all the Exchange Servers in your setup. You can use this to automate the restart of all the services on all servers.
- OpenNotepadorPowerShell ISE.
- Create a new file, calledRestart-IIS.ps1and enter the following code.
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn
# Get All Exchange Servers
$Servers = Get-ExchangeServer
foreach ($Server in $Servers) {
Write-Host "Restarting IIS on server: $($Server.Name)" -ForegroundColor Green
IISRESET $Server.Name
# Optional: Get the Status
Write-Host "IIS status for server $($server):"
IISRESET $server.Name /status
}
Write-host "IIS restarted on all Exchange Servers"
- Save the file at the location recommended by Microsoft, which isC:\Scripts.
- Open aPowerShellwindow as Administrator and run.\RestartIIS.ps1to execute the command.
- The script will run. For each server in your setup, it will reset the service using theIISRESETcommand and will then check the status of the service.
The advantage of using this method is that it will restart all the services for the Internet Information Services (IIS) cleanly for all the servers in an automated way.
Conclusion
You would need to restart the Internet Information Services (IIS) whenever there is an issue or to fix a problem. However, there could be instances where there are underlying issues with the Exchange Server’s health. In such a situation, after an abrupt reboot, the databases might not mount due to corruption.
In such cases, a third-party application, such asStellar Repair for Exchangecomes in handy. With this application, you can restore all the data with efficiency and ease. The application can open any version of Exchange Server database with no size limit and in any state -dirty shutdownor clean. You can browse through the database and export the EDB data granularly to PST and other file formats. You can also use the application to export directly to a live Exchange Server database or Microsoft 365. You can export user mailboxes, archives, shared mailboxes, disabled mailboxes, and public folders.