我正在尝试使用不同的属性(如 errorVariable、Variable、errorFile、outputFile)将 Powershell 的输出返回给 ColdFusion,但没有成功。
冷融合代码 -
<cfset hello = "hello">
<cfexecute name="C:\windows\system32\cmd.exe"
arguments="/c start c:\windows\system32\WindowsPowerShell\v1.0\powershell.exe C:\Users\raimonds\Desktop\lala.ps1 '#hello#'"
variable="test">
<cfdump var="#test#">
而powershell代码 -
param([string]$hello)
Write-Host $hello
谢谢