E2K10 – Write Event 999…


A powershell to monitor message queues for dedicated E2K10 hub servers

foreach ($HubServer in $HubServers) {
  $a = get-transportserver -identity $HubServer | get-queue | where {$_.MessageCount -gt 0} | measure-object    MessageCount -max
if ($a.Maximum -ge $jonsonCounter ) {
$eventMsg = ‘The message queue on ‘ + $HubServer + ‘ is ‘+ $a.Maximum +’ which exceeds ‘ +$JonsonCounter
Write-EventLog -EntryType Warning -LogName ‘Application’ -Source ‘Jonson E2K10’ -Message $eventMsg -id ‘999’
}
}
. schedule task with system id to run every 15 mins
. a tip from Macro Shaw on the customized event Souce “Jonson E2K10” – http://marcoshaw.blogspot.com/2010/10/using-write-eventlog.html

Advertisements
This entry was posted in Exchange 2010. Bookmark the permalink.

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