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 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 )

Google+ photo

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

Connecting to %s