Powershell to Get all the Exchange Services Status

Powershell check can pull all the Exchange Services status runing on the exchange 2007 Servers

$Exchserver = “<Servername>”
$ExchServices = (gwmi -computer $Exchserver -query “select * from win32_service where Name like ‘MSExchange%’ or Name like ‘IIS%’ or Name like ‘SMTP%’ or Name like ‘POP%’ or Name like ‘W3SVC%'”)
$Services = @()
Foreach ($Service in $ExchServices){
$Service.Caption
$Service.Startname
$Service.StartMode
$Service.State
}

Leave a comment