我正在尝试使用以下代码将用户提供的值传递给 PowerShell 脚本,但没有运气:
<cfset MyVar="Woila!">
<cfoutput>
<cfexecute name="C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"
arguments="$MyVar = #MyVar# C:\Users\raimonds\Desktop\create_website_IIS_aws_uat_1.ps1"
/>
</cfoutput>
该参数写入 PowerShell 命令行,但它没有使用此语法将变量传递到 .ps1 脚本$MyVar
。