Services starting/stoping and startup type change with PowerShell

To Get all the MxExchange Services Startup Type to  Automatic State

Get-Service | where{$_.Name –Like ‘MSExchange*’} | set-Service –StartupType ‘Automatic’

Start all msExchange services

Get-Service | where{$_.Name –Like ‘MSExchange*’} | start-Service

 

Stop all msExchange services

Get-Service | where{$_.Name –Like ‘MSExchange*’} | stop-Service –Force

Advertisements

Exchange 2010 Setup OfflineAddressBook error

Some time when there was old exchange 2003 or 2007 in the Environment the Setup of new Exchange 2010 may fail with :

Error:

The following error was generated when “$error.Clear();
get-OfflineAddressBook -DomainController $RoleDomainController | where { $_.IsDefault } | Enable-OabWebDistribution
” was run: “Exchange server “Public Folder Database 1212121212″ was not found. Please make sure you typed the name correctly.”.

In this case the error is caused buy the OfflineABServer  attribute under “Configuration->Services->Microsoft Exchange->Organisationname->Address lists Container->Offline Address List-Default Offline Address Book” in ADSIedit.

This Attribut is pointing to PF database because the OAB was distributed over PF. This DB do not exists and was mounted on old 2003 server.

 

To Resolve this issue change the OfflineABServer  to point to the DN of the exchange server which is working right now.

Delete the old server form the “First administrative group” under servers.