{"id":221,"date":"2016-08-19T09:42:38","date_gmt":"2016-08-19T07:42:38","guid":{"rendered":"https:\/\/asenger.de\/blog\/?p=221"},"modified":"2020-01-15T15:36:15","modified_gmt":"2020-01-15T13:36:15","slug":"exchange-start-stop-via-batch","status":"publish","type":"post","link":"https:\/\/asenger.de\/blog\/exchange-start-stop-via-batch\/","title":{"rendered":"Exchange Start &#8211; Stop via Batch"},"content":{"rendered":"<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:679,&quot;href&quot;:&quot;http:\\\/\\\/exchange.sembee.info\\\/2010\\\/shutdown-script.asp&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20250818113814\\\/http:\\\/\\\/exchange.sembee.info\\\/2010\\\/shutdown-script.asp&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 22:37:10&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-11 14:12:23&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-15 07:50:36&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-23 07:51:00&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-03 08:07:59&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-07 09:27:24&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-16 09:01:10&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-23 06:21:14&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-12 05:48:22&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-12 05:48:22&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:680,&quot;href&quot;:&quot;http:\\\/\\\/kevin-olbrich.de\\\/alle-exchange-2013-dienste-neu-starten-bat&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20161028185937\\\/http:\\\/\\\/kevin-olbrich.de\\\/alle-exchange-2013-dienste-neu-starten-bat\\\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 22:37:15&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-02-11 14:12:26&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-03-07 09:27:28&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-03-23 06:21:21&quot;,&quot;http_code&quot;:404}],&quot;broken&quot;:true,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-03-23 06:21:21&quot;,&quot;http_code&quot;:404},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:681,&quot;href&quot;:&quot;http:\\\/\\\/exchange.sembee.info\\\/2003\\\/shutdown-script.asp&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20260207005318\\\/https:\\\/\\\/exchange.sembee.info\\\/2003\\\/shutdown-script.asp&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-11 14:12:31&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-07 09:27:32&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-23 06:21:14&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-03-23 06:21:14&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:682,&quot;href&quot;:&quot;http:\\\/\\\/exchange.sembee.info\\\/2007\\\/shutdown-script.asp&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20241209091352\\\/http:\\\/\\\/exchange.sembee.info\\\/2007\\\/shutdown-script.asp&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 22:37:30&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-11 14:12:29&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-07 09:27:30&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-23 06:21:16&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-03-23 06:21:16&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:683,&quot;href&quot;:&quot;http:\\\/\\\/kevin-olbrich.de\\\/author\\\/kevinolbrich&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20160823184053\\\/http:\\\/\\\/kevin-olbrich.de:80\\\/author\\\/kevinolbrich\\\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 22:37:34&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-02-11 14:12:30&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-03-07 09:27:34&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-03-26 20:06:07&quot;,&quot;http_code&quot;:503}],&quot;broken&quot;:true,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-03-26 20:06:07&quot;,&quot;http_code&quot;:503},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:684,&quot;href&quot;:&quot;http:\\\/\\\/www.zerohoursleep.com\\\/2010\\\/09\\\/quick-tip-restarting-all-microsoft-exchange-services&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20191118055806\\\/http:\\\/\\\/www.zerohoursleep.com:80\\\/2010\\\/09\\\/quick-tip-restarting-all-microsoft-exchange-services\\\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 22:37:36&quot;,&quot;http_code&quot;:429},{&quot;date&quot;:&quot;2026-02-11 14:12:32&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-07 09:27:34&quot;,&quot;http_code&quot;:429},{&quot;date&quot;:&quot;2026-03-26 20:05:57&quot;,&quot;http_code&quot;:429}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-03-26 20:05:57&quot;,&quot;http_code&quot;:429},&quot;process&quot;:&quot;done&quot;}]'><\/div>\n<p>Quellen:<br \/>\n<a href=\"http:\/\/exchange.sembee.info\/2010\/shutdown-script.asp\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/exchange.sembee.info\/2010\/shutdown-script.asp<br \/>\n<\/a><a href=\"http:\/\/kevin-olbrich.de\/alle-exchange-2013-dienste-neu-starten-bat\/\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/kevin-olbrich.de\/alle-exchange-2013-dienste-neu-starten-bat\/<\/a><\/p>\n<div>\n<h1>Exchange 2010 Server Shutdown Script<\/h1>\n<\/div>\n<div>\n<h3>On This Page<\/h3>\n<ul>\n<li>Introduction &#8211; Why Use a Script to Shutdown Exchange?<\/li>\n<li>Shutdown Script<\/li>\n<li>What Does the Script Do?<\/li>\n<li>Shutdown or Restart the Server After Stopping Exchange<\/li>\n<li>Starting Exchange with a Script<\/li>\n<\/ul>\n<h3>Other Versions of Exchange<\/h3>\n<p>This article is available for other versions of Exchange:<\/p>\n<p><a href=\"http:\/\/exchange.sembee.info\/2003\/shutdown-script.asp\">Exchange 2003<\/a><br \/>\n<a href=\"http:\/\/exchange.sembee.info\/2007\/shutdown-script.asp\">Exchange 2007<\/a><\/p>\n<h3>Introduction &#8211; Why Use a Script to Shutdown Exchange?<\/h3>\n<p>If you are running Exchange 2010 on a domain controller, then you will find that it takes the machine a long time to shutdown. This is because the domain functionality stops quicker than Exchange, therefore Exchange is unable to write to the domain controller and has to be be &#8222;killed&#8220; by the operating system.<\/p>\n<p>This continual &#8222;killing&#8220; of the Exchange services, instead of allowing them to shutdown gracefully is not good for the database and is one of the prime reasons for recommending that Exchange is not installed on a domain controller.<\/p>\n<p>A better option is to stop the services before you begin to shutdown the server. This will also cause the server to shutdown more quickly because it isn&#8217;t waiting for the services to timeout. This can significantly decrease the shutdown\/reboot time of SBS Server.<\/p>\n<p>Even if you have a dedicated Exchange server, if you are using a UPS, then you may also want to shutdown the Exchange services before the UPS shuts down the OS. In many cases the domain controller may shut down before Exchange, which will cause delays as Exchange needs to communicate with the the domain controller during the shutdown process.<\/p>\n<p>While you can stop the services yourself using the services administrative tool, instead use a batch script with a shortcut on the desktop.<br \/>\nDue to the dependencies required for some services, you can shortcut the list by stopping one service with the \/y command.<\/p>\n<h3>Shutdown Script<\/h3>\n<p>Below is a sample script. Simply copy and paste it in to a new notepad document and save it as &#8222;stop-exchange.cmd&#8220;.<\/p>\n<p style=\"padding-left: 30px;\">net stop msexchangeadtopology \/y<br \/>\nnet stop msexchangefba \/y<br \/>\nnet stop msftesql-exchange \/y<br \/>\nnet stop msexchangeis \/y<br \/>\nnet stop msexchangesa \/y<br \/>\nnet stop iisadmin \/y<br \/>\nnet stop w3svc \/y<\/p>\n<p>What does the script do?<\/p>\n<p><i>net stop msexchangeadtopology \/y<\/i><\/p>\n<blockquote><p>Stops the &#8222;Microsoft Exchange Active Directory Topology Service&#8220; which will stop the following services<\/p>\n<p>Microsoft Exchange Transport Log Search<br \/>\nMicrosoft Exchange Transport<br \/>\nMicrosoft Exchange Throttling<br \/>\nMicrosoft Exchange Service Host<br \/>\nMicrosoft Exchange Search Indexer<br \/>\nMicrosoft Exchange RPC Client Access<br \/>\nMicrosoft Exchange Replication<br \/>\nMicrosoft Exchange Protected Service Host<br \/>\nMicrosoft Exchange Mail Submission<br \/>\nMicrosoft Exchange Mailbox Replication<br \/>\nMicrosoft Exchange Mailbox Assistants<br \/>\nMicrosoft Exchange File Distribution<br \/>\nMicrosoft Exchange EdgeSync<br \/>\nMicrosoft Exchange Anti-spam Update<br \/>\nMicrosoft Exchange Address Book<\/p>\n<p>It will also stop POP3, IMAP4 and Unified Messaging if those are enabled.<\/p><\/blockquote>\n<p><i>net stop msexchangefba \/y<\/i><\/p>\n<blockquote><p>stops the &#8222;Microsoft Exchange Forms-Based Authentication&#8220; service which does not have any dependencies<\/p><\/blockquote>\n<p><i>net stop msftesql-exchange \/y<\/i><\/p>\n<blockquote><p>stops the &#8222;Microsoft Search (Exchange)&#8220; service which does not have any dependencies<\/p><\/blockquote>\n<p><i>net stop msexchangeis \/y<\/i><\/p>\n<blockquote><p>stops the &#8222;Microsoft Exchange Information Store&#8220; service which does not have any dependencies<\/p><\/blockquote>\n<p><i>net stop msexchangesa \/y<\/i><\/p>\n<blockquote><p>stops the &#8222;Microsoft Exchange System Attendant&#8220; service which does not have any dependencies<\/p><\/blockquote>\n<p><i>net stop iisadmin \/y<\/i><\/p>\n<blockquote><p>stops the IIS admin service, which does not have any dependencies.<\/p><\/blockquote>\n<p><i>net stop w3svc \/y<\/i><\/p>\n<blockquote><p>stops the &#8222;World Wide Web Publishing&#8220; service, which may have any dependencies &#8211; on SBS this will also stop the Remote Desktop Gateway service, which could kick you out of the server if you are using the RWW to access the server.<\/p><\/blockquote>\n<h3>Shutdown or Restart the Server After Stopping Exchange<\/h3>\n<p>If you are using these scripts to shutdown Exchange before a server is shutdown (for example by a UPS) or rebooted, then you may want to fully automate the process by scripting the shutdown\/restart as well. This can be easily achieved by adding an extra line to the end of the script:<\/p>\n<p><i>Restart the server<\/i><\/p>\n<p style=\"padding-left: 30px;\">shutdown \/r \/t 00<\/p>\n<p><i>Shutdown the server<\/i><\/p>\n<p style=\"padding-left: 30px;\">shutdown \/s \/t 00<\/p>\n<h3>Starting Exchange with a Script<\/h3>\n<p>Finally, you might also want a script to start Exchange again. This can be useful if you apply an update which requires a restart of the Exchange services, but don&#8217;t need to restart the server. However starting the services is a little more complex as the less number of the services are dependant on other services. Therefore more services have to be started manually. Simply copy and paste it in to a new notepad document and save it as &#8222;start-exchange.cmd&#8220;.<\/p>\n<p>Remember to add POP3 and IMAP services if you are using those.<\/p>\n<p style=\"padding-left: 30px;\">net start &#8222;World Wide Web Publishing Service&#8220;<br \/>\nnet start &#8222;Microsoft Exchange System Attendant&#8220;<br \/>\nnet start &#8222;Microsoft Search (Exchange)&#8220;<br \/>\nnet start &#8222;Microsoft Exchange Information Store&#8220;<br \/>\nnet start &#8222;Microsoft Exchange Unified Messaging&#8220;<br \/>\nnet start &#8222;Microsoft Exchange Transport Log Search&#8220;<br \/>\nnet start &#8222;Microsoft Exchange Transport&#8220;<br \/>\nnet start &#8222;Microsoft Exchange Throttling&#8220;<br \/>\nnet start &#8222;Microsoft Exchange Service Host&#8220;<br \/>\nnet start &#8222;Microsoft Exchange Search Indexer&#8220;<br \/>\nnet start &#8222;Microsoft Exchange RPC Client Access&#8220;<br \/>\nnet start &#8222;Microsoft Exchange Replication&#8220;<br \/>\nnet start &#8222;Microsoft Exchange Protected Service Host&#8220;<br \/>\nnet start &#8222;Microsoft Exchange Mailbox Replication&#8220;<br \/>\nnet start &#8222;Microsoft Exchange Mailbox Assistants&#8220;<br \/>\nnet start &#8222;Microsoft Exchange Mail Submission&#8220;<br \/>\nnet start &#8222;Microsoft Exchange Forms-Based Authentication service&#8220;<br \/>\nnet start &#8222;Microsoft Exchange File Distribution&#8220;<br \/>\nnet start &#8222;Microsoft Exchange EdgeSync&#8220;<br \/>\nnet start &#8222;Microsoft Exchange Anti-spam Update&#8220;<br \/>\nnet start &#8222;Microsoft Exchange Address Book&#8220;<\/p>\n<p>Bemerkung: dieses Skript funkioniert nur mit der englischen Version. Umgearbeitet nach universell siehe anschlie\u00dfend: (Download meines Skripts ganz am Ende des Beitrags)<\/p>\n<p style=\"padding-left: 30px;\">net start W3SVC<br \/>\nnet start MSExchangeADTopology<br \/>\nnet start MSExchangeEdgeSync<br \/>\nnet start wsbexchange<br \/>\nnet start MSExchangeAB<br \/>\nnet start MSExchangeAntispamUpdate<br \/>\nnet start MSExchangeFDS<br \/>\nnet start MSExchangeServiceHost<br \/>\nnet start MSExchangeThrottling<br \/>\nnet start MSExchangeIS<br \/>\nnet start MSExchangeMailSubmission<br \/>\nnet start MSExchangeMailboxAssistants<br \/>\nnet start MSExchangeMailboxReplication<br \/>\nnet start MSExchangeRepl<br \/>\nnet start MSExchangeRPC<br \/>\nnet start MSExchangeSearch<br \/>\nnet start MSExchangeSA<br \/>\nnet start MSExchangeTransport<br \/>\nnet start MSExchangeTransportLogSearch<br \/>\nnet start msftesql-Exchange<br \/>\nnet start MSExchangeMonitoring<\/p>\n<hr>\n<header class=\"entry-header\">\n<h1 class=\"entry-title\">Alle Exchange 2013-Dienste neu starten (Batch \/ PowerShell \/ .bat \/ .ps1)<\/h1>\n<div class=\"below-title-meta\">\n<div class=\"adt\">By <span class=\"vcard author\"><span class=\"fn\"><a title=\"Beitr\u00e4ge von Kevin Olbrich\" href=\"http:\/\/kevin-olbrich.de\/author\/kevinolbrich\/\" rel=\"author\">Kevin Olbrich<\/a><\/span> <\/span><span class=\"meta-sep\">|<\/span> <span class=\"date updated\">September 24, 2014<\/span><\/div>\n<div class=\"adt-comment\">&nbsp;<\/div>\n<\/div>\n<\/header>\n<div class=\"entry-content\">\n<p>Wer auf die Schnelle mal alle Exchange-Dienste neustarten m\u00f6chte, der kann einfach folgendes in eine normale PowerShell-Konsole kopieren:<\/p>\n<blockquote><p>$services = Get-Service | ? { $_.name -like \u201eMSExchange*\u201c -and $_.Status -eq \u201eRunning\u201c}<br \/>\nforeach ($service in $services) {Restart-Service $service.name -Force}<\/p><\/blockquote>\n<p>Unter Umst\u00e4nden kommt eine Meldung wegen Timeout auf ausgelasteten Servern, diese kann einfach ignoriert werden.<\/p>\n<p>Der Original-Beitrag:<\/p>\n<blockquote><p>Quick Tip: Restarting all Microsoft Exchange services<\/p>\n<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>Restarting All Running Services<\/p>\n<p>This will get all services starting with MSexchange that are running and restart them.<\/p>\n<blockquote><p>$services = Get-Service | ? { $_.name -like \u201eMSExchange*\u201c -and $_.Status -eq \u201eRunning\u201c}<\/p>\n<p>foreach ($service in $services) {Restart-Service $service.name -Force}<\/p><\/blockquote>\n<p>Restarting All Running Services with startup type Automatic<\/p>\n<p>Although 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<blockquote><p>$services = get-wmiobject win32_service | ? {$_.name -like \u201eMSExchange*\u201c -and $_.StartMode -eq \u201eAuto\u201c}<\/p>\n<p>foreach ($service in $services) {Restart-Service $service.name -Force}<\/p><\/blockquote>\n<p>That\u2019s it for now<\/p>\n<p>via <a href=\"http:\/\/www.zerohoursleep.com\/2010\/09\/quick-tip-restarting-all-microsoft-exchange-services\/\">Quick Tip: Restarting all Microsoft Exchange services | zero hour sleep<\/a>.<\/p><\/blockquote>\n<p>Mein Skript f\u00fcr Exchange 2010, Deutsch zum Download als Textfile.<br \/>\nVor dem Einsatz bitte durcharbeiten und nach .cmd umbenennen. Ich \u00fcbernehme keinerlei Haftung f\u00fcr eventuelle Sch\u00e4den:<\/p>\n<p><a href=\"https:\/\/asenger.de\/blog\/wp-content\/uploads\/2016\/08\/stop-start-exchange.txt\">stop start exchange<\/a><\/p>\n<\/div>\n<\/div>\n<p><!--more--><\/p>\n<p><!--more--><\/p>\n<p><!--more--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Quellen: http:\/\/exchange.sembee.info\/2010\/shutdown-script.asp http:\/\/kevin-olbrich.de\/alle-exchange-2013-dienste-neu-starten-bat\/ Exchange 2010 Server Shutdown Script On This Page Introduction &#8211; Why Use a Script to Shutdown Exchange? Shutdown Script What Does the Script Do? Shutdown or Restart the Server After Stopping Exchange Starting Exchange with a Script Other Versions of Exchange This article is available for other <a href=\"https:\/\/asenger.de\/blog\/exchange-start-stop-via-batch\/\" class=\"btn btn-link continue-link\">Continue Reading<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-221","post","type-post","status-publish","format-standard","hentry","category-it"],"_links":{"self":[{"href":"https:\/\/asenger.de\/blog\/wp-json\/wp\/v2\/posts\/221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/asenger.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/asenger.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/asenger.de\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/asenger.de\/blog\/wp-json\/wp\/v2\/comments?post=221"}],"version-history":[{"count":0,"href":"https:\/\/asenger.de\/blog\/wp-json\/wp\/v2\/posts\/221\/revisions"}],"wp:attachment":[{"href":"https:\/\/asenger.de\/blog\/wp-json\/wp\/v2\/media?parent=221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/asenger.de\/blog\/wp-json\/wp\/v2\/categories?post=221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/asenger.de\/blog\/wp-json\/wp\/v2\/tags?post=221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}