?
Solved

VB Or Power Shell Test Exchange Email Functionality

Posted on 2014-04-03
6
Medium Priority
?
409 Views
Last Modified: 2014-04-11
Does anyone have a script to run as a job every so often to text if exchange is sending email out its queue?  We have a client with a large exchange environment and once in a while it stops working, our own internal exchange server could alert us, I know VB can send email directly to any server we choose, we have VPN tunnel connectivity to the other environment...

I tried to word it the best I could but would love some input and or questions.

Thanks!
0
Comment
Question by:smyers051972
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
6 Comments
 
LVL 38

Expert Comment

by:Rich Rumble
ID: 39978054
You can use VBScript, it requires that a user be logged in, and it will run as that user using outlook. http://support.microsoft.com/kb/161088
This one does not require outlook, and can use a 3rd party like gmail to send the email perhaps as another kind of test (receiving test).
http://cmanios.wordpress.com/2012/09/12/send-email-from-vbscript-using-smtp-and-gmail/
-rich
0
 
LVL 1

Author Comment

by:smyers051972
ID: 39978330
I had some time to think on this so here is our situation we have multiple domains, our own internal one we can call domainx.com and the clients exchange domainy.com we could use a script on our end to send us an email from the clients domain to us.... I am not sure what else from there.  I would prefer not using outlook if possible.
0
 
LVL 1

Author Comment

by:smyers051972
ID: 39978344
If not that way I am thinking need a way to test if Exchange SMTP is working, if its not email us a ticket to our support email...
0
 
LVL 38

Accepted Solution

by:
Rich Rumble earned 2000 total points
ID: 39978435
Is there possibly an event in the evt log that gets triggered when it dies? Does the exe/service itself stop? If the service stops or the exe does, you can create a trigger using vbscript to send an alert with a 3rd party email like google or some other SMTP server that is working. Well the script can do a lot of things really, and services have a extra method within themselves to try to restart themselves if they fail. The "recovery" tab has all sorts of actions you can take: http://technet.microsoft.com/en-us/library/cc753662.aspx
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colProcesses = objWMIService.ExecQuery _
    ("Select * from Win32_Process Where Name = 'exchange.exe'")
If colProcesses.Count = 0 Then
    Wscript.Echo " Exchange.exe is not running."
Else
    Wscript.Echo " Exchange.exe is running."
End If

Open in new window

If you want to search for a specific Event code or item:
http://blogs.technet.com/b/heyscriptingguy/archive/2007/02/26/how-can-i-monitor-event-log-messages-for-specific-words.aspx
http://blogs.technet.com/b/heyscriptingguy/archive/2005/08/16/how-can-i-monitor-the-event-logs-for-the-occurrence-of-a-specific-event.aspx (how to loop)
-rich
0
 
LVL 42

Expert Comment

by:kevinhsieh
ID: 39978456
I use a program called IPsentry to monitor my Exchange environment. Specifically it has the ability to send an email via SMTP and then check to via POP3 if it has been delivered. It can send out email and text alerts, and it has a ton of other functionality, and its very reasonably priced. If you want to check outgoing queues, you could relay a message from their server and then check for it on your server or any other mail provider that accepts POP3 access. You can also check the event logs, though I have no idea what to look for.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Group policies can be applied selectively to specific devices with the help of groups. Utilising this, it is possible to phase-in group policies, over a period of time, by randomly adding non-members user or computers at a set interval, to a group f…
Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…
Suggested Courses
Course of the Month11 days, 8 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question