Are you entering the path in the startin directory enclosed in double quotes by any chance?

Mon Mar 18, 2013 10:02 pm

kishorepi

Joined: 11 Mar 2013Posts: 10Country: United States

No, i just copy and pasted the path as is no quotes.

Am i missing antyhing?

Tue Mar 19, 2013 8:18 am

kishorepi

Joined: 11 Mar 2013Posts: 10Country: United States

Can you please provide the steps to create a job to execute a batch file which internall executes a power shell script (.ps1) file?

Thu Mar 21, 2013 5:01 pm

SysOpSite Admin

Joined: 26 Nov 2006Posts: 6579

The simplest method
1. In 24x7 create a new job. In the Job Wizard choose Script type job, click Next
2. For the script type choose, Batch/shell script
3. Paste the command line you want to use for your Powershell script and any other commands that might be required for running the script, for example

3. Click Finish.
4. Run the job using Run Now -> Normal mode. If it works, finish job properties, schedule, error handling and notifications, etc... If it doesn't, review the job output (see the Output tab, click the output link).
If there are errors and you are not sure what to do about them, please post the complete output here

Fri Mar 22, 2013 7:42 am

RLINick

Joined: 13 Aug 2013Posts: 5

I am running into the same issue of being unable to execute powershell scripts from 24x7.

I have the powershell portion being launched in a batch script that also writes to a text file during the start of the script and at the end of the script so I know the batch portion is executing to completion.
Nothing is logged in the job output. It tells me the file content is empty after the job completes:

24x7 captures standard output and standard error streams of the launched process. If you process launches a child process and that child process doesn't write to the same standard output and standard error, you are not going to see them in 24x7.

I suggest adding to your batch file before and after the powerashell command some output like