Files
docs/services/email/Microsoft Exchange/Scripts/Restart Exchange Services.md
Nicole Rappe daf24d7480
All checks were successful
GitOps Automatic Documentation Deployment / Sync Docs to https://kb.bunny-lab.io (push) Successful in 5s
GitOps Automatic Documentation Deployment / Sync Docs to https://docs.bunny-lab.io (push) Successful in 7s
Mass-File and Folder Renaming
2026-02-24 20:26:52 -07:00

785 B
Raw Blame History

tags
tags
Microsoft Exchange
Email

Purpose:

Sometimes Microsoft Exchange Server will misbehave and the services will need to be bumped to fix them. This script iterates over all of the Exchange-related services and restarts them automatically for you.

$servicelist = Get-Service | Where-Object {$_.DisplayName -like "Microsoft Exchange *"}
$servicelist += Get-Service | Where-Object {$_.DisplayName -eq "IIS Admin Service"}
$servicelist += Get-Service | Where-Object { $_.DisplayName eq "Windows Management Instrumentation" }
$servicelist += Get-Service | Where-Object { $_.DisplayName eq "World Wide Web Publishing Service" }

foreach($service in $servicelist){
    Set-Service $service -StartupType Automatic
    Start-Service $service
}