Link to home
Start Free TrialLog in
Avatar of webitservices
webitservicesFlag for United States of America

asked on

Script to restart all Exchange 2013 Services

All,

Is there a script PowerShell, VbScript, or Batch file that exists to easily (loose term) restart all Exchange 2013 services.

Thanks for any feedback.

Chad
Avatar of joensw
joensw
Flag of Morocco image

hi

yes there are command-line methods you can use to stop and/or start services. If this is being done locally, you would use NET STOP or NET START:


net stop MSExchangeMSMI
net stop MSExchangePCMTA
net stop MSExchangeFB
net stop MSExchangeDX
net stop MSExchangeIMC
net stop MSExchangeMTA
net stop MSExchangeIS
net stop MSExchangeDS
net stop MSExchangeSA

To start these same services, you would use this batch file:

net start MSExchangeSA
net start MSExchangeDS
net start MSExchangeIS
net start MSExchangeMTA
net start MSExchangeIMC
net start MSExchangeDX
net start MSExchangeFB
net start MSExchangePCMTA
net start MSExchangeMSMI



https://www.experts-exchange.com/questions/28140960/Script-to-restart-all-automatic-services-for-exchange-3010.html
ASKER CERTIFIED SOLUTION
Avatar of Lazarus
Lazarus
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of webitservices

ASKER

Lazarus98 that was close enough but I took what you said and had to make some changes for it to work.  Ran it twice and seems to work great!  Thanks for the replies and help!

Stop Services
Get-service -name "msexchange*" -dependentservices | Where-Object {$_.Status -eq 'Running'} | Stop-Service

Start Services
Get-service -name "msexchange*" -dependentservices | Where-Object {$_.Status -eq 'stopped'} | Start-Service
I'm a asumming the change is because of the 2013 version, I only had 2010 to test that on, thanks for the update though as it will help me when I change over to our new severs.