Hi, I'm having problems with Executing powershell, for example:
cmd = EvalInsert(
"\[$imageFile = "test"]\");
rp1 = RunProgram(Executable("C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" ),
Options(Eval(cmd)),
ReadFunction("text")
);
The actual cmd i want to use is more complex but has the same problem with speechmarks. Printing rp1 in the log gives:
"test : The term 'test' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:14
+ $imageFile = test
+ ~~~~
+ CategoryInfo : ObjectNotFound: (test:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
"
Which implies the line was ran without speechmarks.
How would I ensure speechmarks are ran correctly?
Thanks in advance for any help on this.