10 Replies Latest reply on Feb 6, 2014 12:50 PM by Toby Erkson

    How to read tabadmin STATUS in a batch script?

    Toby Erkson

      I'm building a batch file to save log files and back-up the server based upon what's been given here:


      The batch file is executed by the Scheduler.  OS is Windows 2008 R2


      I'm not an expert DOS person so I'm having some difficulty with the following line:

      if tabadmin status != 'RUNNING' then [code to email an alert]

      Specifically, in my script, I've gotten this far:


           if tabadmin status EQU "RUNNING" GOTO End



           ECHO Re-start and/or Cleanup failed!

           REM We want the returned error level NOT to be zero

           SET /a EL=1


      EXIT /b %EL%


      However, when it gets to "if tabadmin status..."  it returns "status was unexpected at this time."

      So how do I check the status of the server for use in a batch file?  I have also tried if tabadmin status = "RUNNING" GOTO End.