Exchange 2010 Services

#MSExchange

So I have had some fun today with SP3, and it barfing to install a number times blah, blah, blah.

Eventually it kinda install, but bitches about:

Mailbox Server Role                                       FAILED
The following error was generated when “$error.Clear();
if ($exsSid -eq $null -or $exsSid -eq “”)
{
$exsSid = get-ExchangeServerGroupSID -DomainController $RoleDomainController
}
start-setupservice -ServiceName MSExchangeADTopology -ServiceParameters $exsSid,$RoleDomainController
” was run: “Service ‘MSExchangeADTopology’ is disabled on this server.”.

So this is because setup is clever :-| and changes the service state as it goes.  For some reason it can’t -or- doesn’t want to reset the services to its normal state.  So I knocked this up.  Basically a hash table of the services and startup type, then sets them

#http://technet.microsoft.com/en-us/library/ee423542(v=exchg.141).aspx
$ExchServices += @{“MSExchangeADTopology”           = “Automatic”}
$ExchServices += @{“ADAM_MSExchange”                = “Automatic”}
$ExchServices += @{“MSExchangeAB”                   = “Automatic”}
$ExchServices += @{“MSExchangeAntispamUpdate”       = “Automatic”}
$ExchServices += @{“MSExchangeEdgeCredential”       = “Automatic”}
$ExchServices += @{“MSExchangeEdgeSync”             = “Automatic”}
$ExchServices += @{“MSExchangeFDS”                  = “Automatic”}
$ExchServices += @{“MSExchangeFBA”                  = “Automatic”}
$ExchServices += @{“MSExchangeIMAP4”                = “Manual”}
$ExchServices += @{“MSExchangeIS”                   = “Automatic”}
$ExchServices += @{“MSExchangeMailSubmission”       = “Automatic”}
$ExchServices += @{“MSExchangeMailboxAssistants”    = “Automatic”}
$ExchServices += @{“MSExchangeMailboxReplication”   = “Automatic”}
$ExchServices += @{“MSExchangeMonitoring”           = “Manual”}
$ExchServices += @{“MSExchangePOP3”                 = “Manual”}
$ExchServices += @{“MSExchangeProtectedServiceHost” = “Automatic”}
$ExchServices += @{“MSExchangeRepl”                 = “Automatic”}
$ExchServices += @{“MSExchangeRPC”                  = “Automatic”}
$ExchServices += @{“MSExchangeSearch”               = “Automatic”}
$ExchServices += @{“WSBExchange”                    = “Manual”}
$ExchServices += @{“MSExchangeServiceHost”          = “Automatic”}
$ExchServices += @{“MSSpeechService”                = “Automatic”}
$ExchServices += @{“MSExchangeSA”                   = “Automatic”}
$ExchServices += @{“MSExchangeThrottling”           = “Automatic”}
$ExchServices += @{“MSExchangeTransport”            = “Automatic”}
$ExchServices += @{“MSExchangeTransportLogSearch”   = “Automatic”}
$ExchServices += @{“MSExchangeUM”                   = “Automatic”}
$ExchServices += @{“msftesql-Exchange”              = “Manual”}
$services = Get-Service mse*

ForEach($service in $services){
$ServiceName = $Service.Name
$StartupType = $ExchServices.$ServiceName
Write-Host $ServiceName
Write-Host $StartupType
Set-Service $ServiceName -StartupType $StartupType
}

2 thoughts on “Exchange 2010 Services

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.