I want to execute a PowerShell script using php. Using cmd it is working fine, but it is not working using php and I am using wamp server.
My code is as follows:
<?php
ini_set('max_execution_time', 300);
//$output=shell_exec('cd C:\AWS\Distributed-setup-3');
//$output=shell_exec('cd');
$output=shell_exec('powershell.exe -command C:\AWS\Distributed-setup-3\AWSExecuter.ps1');
echo $output;
?>
Here I am using Input.yaml file for taking inputs it is giving error as, Problem in Input file 'Input.yaml'. But for manual execution I am using same input file. There it will not give any error.
Can anyone help me? Since three days I am working on this. I am getting how to debug this one.