Thanks Mike. Got it done. I need to learn power shell:( Regards
Liby Philip Mathew | ICT Consultant ICT Professional Services Path Solutions Tel: +965 24824600 Ext. 703 Fax: +965 24824500 www.path-solutions.com<http://www.path-solutions.com/> From: Michael B. Smith [mailto:[email protected]] Sent: Monday, January 10, 2011 4:11 PM To: MS-Exchange Admin Issues Subject: RE: PS Script to notify when a queue exceeds limit So... Get-Queue |? { $_.MessageCount -gt 20 } |% { send-mailmessage -to [email protected]<mailto:[email protected]> -subject "queue $($_.identity) too full ($($_.MessageCount))" Put that into a BAT file and schedule the BAT file using task scheduler to run every 30 minutes. Regards, Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com From: Liby Philip Mathew [mailto:[email protected]] Sent: Monday, January 10, 2011 7:25 AM To: MS-Exchange Admin Issues Subject: RE: PS Script to notify when a queue exceeds limit Thanks Mike, I am on E2K7 SP2. I guess your query is in reference to Send-MailMessage cmd-let. If so, that part is taken care. But I need to send a message only if a Q exceeds 20 mails with the Identity & MessageCount of the Q and schedule it as a task that runs every 30min or so. Regards Liby Philip Mathew From: Michael B. Smith [mailto:[email protected]] Sent: Monday, January 10, 2011 3:17 PM To: MS-Exchange Admin Issues Subject: RE: PS Script to notify when a queue exceeds limit Getting the number of messages in queues is trivial. get-queue | select Identity, MessageCount Sending a message differs somewhat depending on the version of Exchange (2007/2010). Which are you running? Regards, Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com From: Liby Philip Mathew [mailto:[email protected]] Sent: Sunday, January 09, 2011 1:24 AM To: MS-Exchange Admin Issues Subject: PS Script to notify when a queue exceeds limit HI, I am looking for a power shell script that can generates a mail and post it to admin when a mail queue (on Hub & Edge)exceeds a particular number. Hope someone may have it. Appreciate getting a help on the same. Regards Liby Philip Mathew ________________________________ Disclaimer [The information contained in this e-mail message and any attached files are confidential information and intended solely for the use of the individual or entity to whom they are addressed. This transmission may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you have received this e-mail in error, please notify the sender immediately and delete all copies. If you are not the intended recipient, any disclosure, copying, distribution, or use of the information contained herein is STRICTLY PROHIBITED. Path Solutions accepts no responsibility for any errors, omissions, computer viruses and other defects.] --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to [email protected]<mailto:[email protected]> with the body: unsubscribe exchangelist --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to [email protected]<mailto:[email protected]> with the body: unsubscribe exchangelist --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to [email protected]<mailto:[email protected]> with the body: unsubscribe exchangelist --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to [email protected]<mailto:[email protected]> with the body: unsubscribe exchangelist --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to [email protected] with the body: unsubscribe exchangelist
