Title: External check help

I wrote a simple _vbscript_ (below) that checks to see if an Information Store in Exchange 2000/2003 is mounted.  The script returns the expected value when using the "checkerrorlevel.exe" program yet I'm not seeing expected results in Servers Alive!  In Servers Alive! I have set the alarm box to "d:\scripts\storestatuscheck.vbs" (minus the quotes) and the check of "is = to" to a value of "1".  Sadly, I do not see "OK" when the errorlevel returned is 0 as I do in checkerrorlevel.exe program.  Please advise.

Set objServer = CreateObject("CDOEXM.ExchangeServer")
Set objMDB = CreateObject("CDOEXM.MailboxStoreDB")

objServer.DataSource.Open "TESTA.uwgb.edu"

  strSG = objServer.StorageGroups
  strSG1 = Mid(strSG(0), InStr(2, strSG(0), "CN"))
  objFirstSG = "CN=" & "First Storage Group" & "," & strSG1

strURL = "LDAP://" & objServer.DirectoryServer & "/cn=" & "Mailbox Store (TESTA)" & "," & objFirstSG
objMDB.DataSource.Open strURL

Select Case objMDB.Status
        Case 0
                wscript.quit(0)
        Case 1
                wscript.quit(1)
        Case Else
                wscript.quit(1)
End select

----------------------------------------------------------------------------
Thank you,
Pete Kretche
MCP, A+
Network Systems Administrator
UW - Green Bay
920.465.5014
[EMAIL PROTECTED]

"Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep." - Scott Adams

Reply via email to