You can return a value as an errorlevel in both vbs and powershell scripts.
VBS: The command WScript.Quit 10 in a script will exit with an errorlevel of 10. Powershell: The solution is more complicated and requires a workaround but you can find an example here: http://thepowershellguy.com/blogs/posh/archive/2008/05/20/hey-powershell -guy-how-can-i-run-a-powershell-script-from-cmd-exe-and-return-an-errorl evel.aspx Richard -----Original Message----- From: Servers Alive Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Thursday, September 25, 2008 7:26 AM To: Servers Alive Discussion List Subject: RE: [SA-list] Exchange monitoring with powershell Thanks Dirk, I'm not sure how to do that, as power shell is a utility all of its own. I know that you can run scripts, and bat files, so I assume there is a way to do it, but I was hoping someone may have already done it and have an example, from the lack of replies it looks like that is not the case though. To other SA users, if you have an powershell checks running, I'd love to know the details. Thanks, Jesse -----Original Message----- From: Servers Alive Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Dirk Posted At: Tuesday, September 23, 2008 10:40 AM Posted To: Servers Alive mailing list Conversation: [SA-list] Exchange monitoring with powershell Subject: RE: [SA-list] Exchange monitoring with powershell Can such a script return an errorlevel? If so then you can use the EXTERNAL ERRORLEVEL check type. Dirk Bulinckx. -----Original Message----- From: Servers Alive Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, September 23, 2008 3:55 PM To: Servers Alive Discussion List Subject: [SA-list] Exchange monitoring with powershell Hi all, we are running SA version 6.0.0.2056, and as we are migrating to exchange 2007 we are looking for ways to monitor the new servers. We'd like to be able to run powershell scripts and check the results. Things like the: "test-exchangesearch" script to verify that the index is working. Has anyone successfully been able to build a monitor item based on a powershell script? Any suggestions for doing this? Thanks for any and all ideas! Jesse To unsubscribe send a message with UNSUBSCRIBE in the subject line to salive@woodstone.nu If you use auto-responders (like out-of-the-office messages), make sure that they are not sent to the list nor to individual members. Doing so will cause you to be automatically removed from the list.= To unsubscribe send a message with UNSUBSCRIBE in the subject line to salive@woodstone.nu If you use auto-responders (like out-of-the-office messages), make sure that they are not sent to the list nor to individual members. Doing so will cause you to be automatically removed from the list. To unsubscribe send a message with UNSUBSCRIBE in the subject line to salive@woodstone.nu If you use auto-responders (like out-of-the-office messages), make sure that they are not sent to the list nor to individual members. Doing so will cause you to be automatically removed from the list. To unsubscribe send a message with UNSUBSCRIBE in the subject line to salive@woodstone.nu If you use auto-responders (like out-of-the-office messages), make sure that they are not sent to the list nor to individual members. Doing so will cause you to be automatically removed from the list.