IT Process Automation

  • 1.  Run batch file in IT PAM.

    Posted Mar 10, 2016 10:59 AM

    I would like to run this batch file in IT PAM like this one D:\PUTTY\DPO.cmd. I tried the run script operator but it is just running endlessly.

     

    Can you teach me how to properly run it?

     

    Thanks in advance for the help.


    Regards,

    Michael Ela



  • 2.  Re: Run batch file in IT PAM.

    Broadcom Employee
    Posted Mar 11, 2016 09:01 AM

    If the batch file does not return a value or is waiting for user interaction, the run script operator will never complete.

     

    If you manually run the batch file from a command prompt, do you get results?  Does a prompt return eventually?



  • 3.  Re: Run batch file in IT PAM.

    Posted Mar 14, 2016 07:52 AM

    I see. Will check and try to return a value on the batch file.



  • 4.  Re: Run batch file in IT PAM.

    Posted Mar 14, 2016 10:51 AM

    I run the batch file from prompt and it return to the promt

    I tried to add echo %errorlevel% at the end of the script and it returned 0

     

    I ran it in IT PAM and it still just kept on running endlessly.

     

    Inline Text :

    D:\\PUTTY\\DPO.cmd



  • 5.  Re: Run batch file in IT PAM.
    Best Answer

    Broadcom Employee
    Posted Mar 15, 2016 01:27 PM

    From this post I can't tell anything that you are doing wrong.  Maybe try a more simple batch file than the one you are trying to use?  Make sure a simple batch file works? 

     

    If you continue to have issues I would encourage you to open a support case so we can take a closer look.  You can upload the process to a support issue and we can evaluate this better.



  • 6.  Re: Run batch file in IT PAM.

    Posted Mar 16, 2016 08:46 AM

    I tried a simple echo test and it did work. However, I need to run the putty.exe command below.

    Do you have any suggestion?

     

    @echo off

    cd \
    D:

    cd PUTTY

    putty.exe -ssh -load "INTFTP" -l myuser -pw maypassword -m D:\PUTTY\Command.txt
    echo %errorlevel%



  • 7.  Re: Run batch file in IT PAM.

    Broadcom Employee
    Posted Mar 16, 2016 08:53 AM

    If you are attempting to launch putty from PAM, the operator will continue to run in PAM until you close putty.  The operator does not get the message that the task is done until the exe is ended.



  • 8.  Re: Run batch file in IT PAM.

    Posted Mar 16, 2016 09:35 AM

    I have added the exit command on the Putty command.txt and also an exit command on the batch file.

     

    Putty will automatically close. How can we tell PAM that putty already closed?


    Putty Command:

    putty.exe -ssh -load "INTFTP" -l dp -pw mypassword

    /home/dp/bin/jobmake ALPINE_inbox_get.cfg

    exit

     

    @echo off

    cd \
    D:

    cd PUTTY

    putty.exe -ssh -load "INTFTP" -l myuser -pw mypassword -m D:\PUTTY\Command.txt
    echo %errorlevel%
    exit