powershell -File './scripts/myscript.ps1' -Param1 "My Param"
Whats the syntax needed to deploy a custom script extension that invokes a PowerShell file with params that have a space in them. These are what I've tried so far and none of them have worked. Each of these are as they were in my ARM template:
# Failed to being executing the script. Error from the logs on the VM: "VMExtensionProvisioningError"
"[concat('powershell -File InstallVSTSAgent.ps1 -vstsAccount \"', parameters('vstsAccount'), '\"')]"
# Failed in the same way.
"[concat('powershell -File InstallVSTSAgent.ps1 -vstsAccount \\\"', parameters('vstsAccount'), '\\\"')]"
# Ran, but the parameters entering my PowerShell file were wrapped in `ticks`
"[concat('powershell -File InstallVSTSAgent.ps1 -vstsAccount `\"', parameters('vstsAccount'), '`\"')]"