Learning how Php interacts with Powershell Try the simplest script:
<?php
$query = shell_exec("powershell.exe -File E:\test.ps1");
echo $query;
?>
In script test.ps1 - for example, "Test Connection Server"
The need for an answer in Powershell returned to the Php page, but in response to the white paper ... Please tell me some solution to this problem. Does not have shell_exec. Could there be other options?
source
share