Exchange 2007 Queue alert script

Hi Team,

We have a script in place to alert us if the exchange queue is having more than 100 emails.

$count = 100
$limit = get-transportserver | Get-Queue -Filter {MessageCount -gt $count}

created a batch file and scheduled every 2 mins to run. If the queue has messages it will trigger an email to our admin PDL.

Now my queustion is we have 3 connectors
1. Outbound Queue
2. unity Q
3. Journal Queue

Unity & Journal Queue will send mails from exchange 2007 to 2003 using internal routing group connector.

The script is triggering mails only if mails are queued in outboung 2007 exchange queue.

Can we finetune this script to monitor the defualt routing group connector and trigger email.

We have many issues with the other mails which are flowing to 2003 exchange servers.

plz suggest me.
LVL 2
AhmedAliShaikAsked:
Who is Participating?
 
Manpreet SIngh KhatraSolutions Architect, Project LeadCommented:
What if you do this

$limit = get-transportserver | Get-RoutingGroupConnector - Identity *** |Get-Queue -Filter {MessageCount -gt $count}

- Rancy
0
 
AhmedAliShaikAuthor Commented:
Hey very fast reponse rancy.

I will try it and post you.
0
 
AhmedAliShaikAuthor Commented:
Excellent Rancy.

One more doubt..plz clarify.

We have a send connector configure relay mails from HUB transport to a Application server.
The connector is Appconnector.

Even the script which i shared i not triggering emails for this Queue.

Plz help me Rancy.
0
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

 
Manpreet SIngh KhatraSolutions Architect, Project LeadCommented:
is that Send connector or what ?

- Rancy
0
 
AhmedAliShaikAuthor Commented:
Yes it is a send connector configured to send mails to other application server.

Actual mails are rcvd by hub server and sent to application server through the connector.
0
 
Manpreet SIngh KhatraSolutions Architect, Project LeadCommented:
$limit = get-transportserver | Get-SendConnector - Identity *** |Get-Queue -Filter {MessageCount -gt $count}

- Rancy
0
 
AhmedAliShaikAuthor Commented:
Rancy i am really blessed to have u as an expert.

Like a rocket speed i am getting answers from you. highly & heartly appreciations to you.

i am not only getting answers from u but gaining tons of knowlegde.

I am getting the below error:
Get-SendConnector : The operation could not be performed because object '***' could not be found on domain controller

Do i need to add the connector name manually  replacing the ***

Please suggest.
0
 
AhmedAliShaikAuthor Commented:
Even the same error for routing group connector.


Get-RoutingGroupConnector : The input object cannot be bound to any parameters for the command either because the command does not take pipeline inpu
t or the input and its properties do not match any of the parameters that take pipeline input.
At line:1 char:48
+ get-transportserver | Get-RoutingGroupConnector <<<<  -Identity *** |Get-Queue -Filter {MessageCount -gt 1}
    + CategoryInfo          : InvalidArgument: (hubserver:PSObject) [Get-RoutingGroupConnector], ParameterBindingException
    + FullyQualifiedErrorId : InputObjectNotBound,Microsoft.Exchange.Management.SystemConfigurationTasks.GetRoutingGroupConnector
0
 
Manpreet SIngh KhatraSolutions Architect, Project LeadCommented:
Do i need to add the connector name manually  replacing the *** - Yes the *** should be replaced with your Connector name :)

- Rancy
0
 
AhmedAliShaikAuthor Commented:
Really Excellent.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.