Solved

Script to restart all automatic services for exchange 3010

Posted on 2013-05-28
3
5,896 Views
Last Modified: 2013-05-29
hi there,
Please do you know if it exits a command line with powershell to restart all automatic services without restart ?
thanks,
Regards
0
Comment
Question by:simlip
3 Comments
 
LVL 4

Assisted Solution

by:baller119
baller119 earned 167 total points
ID: 39202552
There is no single command. But you could use this script.

$ignorePattern = '^(ShellHWDetection|MMCSS|sppsvc|clr_optimization.*)$';
Get-WmiObject Win32_Service 
{ 
  $_.StartMode -eq 'Auto' `
  -and $_.State -ne 'Running' `
  -and $_.Name -notmatch $ignorePattern
}
{ 
  $svcName = $_.Name; 
  Restart-Service -Name $_.Name -EA SilentlyContinue; 
}

Open in new window

0
 
LVL 14

Accepted Solution

by:
Ben Hart earned 167 total points
ID: 39202668
Or this in batch form:
@Echo Off
Echo 'Stopping Microsoft Exchange Services'
net stop MSExchangeAB
net stop MSExchangeADTopology
net stop MSExchangeAntispamUpdate
net stop MSExchangeEdgeSync
net stop MSExchangeFBA
net stop MSExchangeFDS
net stop MSExchangeIS
net stop MSExchangeMailboxAssistants
net stop MSExchangeMailboxReplication
net stop MSExchangeMailSubmission
net stop MSExchangeProtectedServiceHost
net stop MSExchangeRepl
net stop MSExchangeRPC
net stop MSExchangeSA
net stop MSExchangeSearch
net stop MSExchangeServiceHost
net stop MSExchangeThrottling
net stop MSExchangeTransport
net stop MSExchangeTransportLogSearch
Echo 'Starting Microsoft Exchange Services'
net start MSExchangeAB
net start MSExchangeADTopology
net start MSExchangeAntispamUpdate
net start MSExchangeEdgeSync
net start MSExchangeFBA
net start MSExchangeFDS
net start MSExchangeIS
net start MSExchangeMailboxAssistants
net start MSExchangeMailboxReplication
net start MSExchangeMailSubmission
net start MSExchangeProtectedServiceHost
net start MSExchangeRepl
net start MSExchangeRPC
net start MSExchangeSA
net start MSExchangeSearch
net start MSExchangeServiceHost
net start MSExchangeThrottling
net start MSExchangeTransport
net start MSExchangeTransportLogSearch
End

Open in new window

0
 
LVL 52

Assisted Solution

by:Manpreet SIngh Khatra
Manpreet SIngh Khatra earned 166 total points
ID: 39203432
Much more from the source article itself ...... details or code stated above

http://therealshrimp.blogspot.in/2010/03/restarting-exchange-2010-services.html

Restarting All Running Services
http://www.zerohoursleep.com/2010/09/quick-tip-restarting-all-microsoft-exchange-services/

$services = Get-Service | ? { $_.name -like "MSExchange*" -and $_.Status -eq "Running"}
foreach ($service in $services) {Restart-Service $service.name -Force}


Script allows you to Start, Stop or Restart Exchange Server 2010 service (only in theses Automatic startup mode)
http://certcollection.org/forum/topic/108267-exchange-2010-services-script/

Automatically restart failed Exchange services using PowerShell
http://blogs.technet.com/b/daveh/archive/2008/12/21/automatically-restart-failed-exchange-services-using-powershell.aspx

- Rancy
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
In this video we show how to create a Contact in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Contact ta…
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now