I want to run TextTransform.exe with the parameter args on my template while in PowerShell v3. Here are my variables and the options I tried. Note that it works with no '-a' parameters, but I need the args to run the template correctly.
$textTransformPath = "C:\Program Files (x86)\Common Files\Microsoft Shared\TextTemplating\14.0\TextTransform.exe"
$templateath = "$ProjectPath\TheTemplate.tt"
$textTransformParams = "-a !!TheParam!$TheValue"
#& "$textTransformPath" "$templatePath" <-- this runs, but no args!
# these don't work:
& "$textTransformPath" "$templatePath" $textTransformParams
& "$textTransformPath" "$templatePath" "$textTransformParams"
I don't know why this is so difficult, it seems like it should be really easy. If I type out this in the standard command line it works, which verifies the problem is with my PS syntax.