Hi! I have powershell installed on a Linux. I’m trying to invoke a small powershell script without success from a webpage written in php. The shell_exec can be bash, perl, python. They all work. But powershell, no luck. The script is working fine directly from the command line (run as apache). I’ve tried a few options when calling pwsh. Still no luck.
$output= shell_exec(’/bin/pwsh -nol -c /usr/local/sysadm/root_cmd/drs.ps1 -vc test1 -vm vmtest’);
’ );’ );
echo( $output );