Link to home
Start Free TrialLog in
Avatar of AhmedAliShaik
AhmedAliShaikFlag for India

asked on

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.
ASKER CERTIFIED SOLUTION
Avatar of Manpreet SIngh Khatra
Manpreet SIngh Khatra
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AhmedAliShaik

ASKER

Hey very fast reponse rancy.

I will try it and post you.
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.
is that Send connector or what ?

- Rancy
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.
$limit = get-transportserver | Get-SendConnector - Identity *** |Get-Queue -Filter {MessageCount -gt $count}

- Rancy
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.
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
Do i need to add the connector name manually  replacing the *** - Yes the *** should be replaced with your Connector name :)

- Rancy
Really Excellent.