{"id":1853,"date":"2016-03-16T23:00:43","date_gmt":"2016-03-16T23:00:43","guid":{"rendered":"http:\/\/microsoftgeek.com\/?p=1853"},"modified":"2016-03-16T23:01:01","modified_gmt":"2016-03-16T23:01:01","slug":"quick-tip-restarting-all-microsoft-exchange-services","status":"publish","type":"post","link":"https:\/\/microsoftgeek.com\/?p=1853","title":{"rendered":"Quick Tip: Restarting all Microsoft Exchange services"},"content":{"rendered":"<p>There are times when you need to restart all Exchange related services so here are 2 small scripts that will help you achieve this without going over each service in the Services mmc.<\/p>\n<p>Of course restarting the \u201cMicrosoft Exchange Active Directory Topology\u201d will restart a most of them but these 2 will restart them all.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Restarting All Running Services<\/strong><br \/>\nThis will get all services starting with MSexchange that are running and restart them.<\/p>\n<pre lang=\"powershell\">$services = Get-Service | ? { $_.name -like \"MSExchange*\" -and $_.Status -eq \"Running\"}\r\nforeach ($service in $services) {Restart-Service $service.name -Force}\r\n\r\n<\/pre>\n<p><strong>Restarting All Running Services with startup type Automatic<\/strong><br \/>\nAlthough the above script should be enough in most cases, it will not restart any Microsoft Exchange related service that is supposed be running but is not for any reason. Here is another version of the script that would take care of this issue, note that we are looking for all services starting with MSExchange with startup type Automatic and restarting them<\/p>\n<pre lang=\"powershell\">$services = get-wmiobject win32_service | ? {$_.name -like \"MSExchange*\" -and $_.StartMode -eq \"Auto\"}\r\nforeach ($service in $services) {Restart-Service $service.name -Force}\r\n\r\n<\/pre>\n<p>That\u2019s it for now<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are times when you need to restart all Exchange related services so here are 2 small scripts that will help you achieve this without going over each service in the Services mmc. Of course restarting the \u201cMicrosoft Exchange Active Directory Topology\u201d will restart a most of them but these 2 will restart them all. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,21,22,58,59],"tags":[],"class_list":["post-1853","post","type-post","status-publish","format-standard","hentry","category-ms-exchange","category-exchange-2007","category-exchange-2010","category-exchange-2013","category-powershell"],"_links":{"self":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/1853","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1853"}],"version-history":[{"count":2,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/1853\/revisions"}],"predecessor-version":[{"id":1855,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/1853\/revisions\/1855"}],"wp:attachment":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1853"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1853"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1853"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}