• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 859
  • Last Modified:

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.
0
AhmedAliShaik
Asked:
AhmedAliShaik
  • 6
  • 4
1 Solution
 
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
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

 
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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now