且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

通过php执行powershell命令

更新时间:2023-01-12 12:07:53

运行这些命令的会话与使用PowerShell手动运行它们的环境变量不同.您必须指定可执行Powershell的绝对路径以及要运行的脚本,以便找到它们.

The session you are running those commands in doesn't have the same environment variables as when you are using PowerShell to run them manually. You'll have to specify the absolute path to the powershell executeable and the scripts that you want to run so that they will be found.

start /WAIT C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe C:\xampp\htdocs\CSVconvert\sortieren.ps1