Hi,
Unfortunately I cannot get the script to run at all. I keep getting the error message in the apache log file:
I have used the "Set-ExecutionPolicy" command to set the policy to Unrestricted and the Apache service is running as Administrator but I can't for the life of me get it to run the Powershell script.
I am trying to run a Powershell script from PHP using Apache on Windows Server 2008. I am using the following code to launch the powershell script:
shell_exec('powershell.exe -command C:\PSscripts\helloworld.ps1')File C:\PSscripts\helloworld.ps1 cannot be loaded because the execution of scripts is disabled on this system.
Running the script directly from Powershell works fine.
Any help would be fantastic!
Thanks.