When using the REGISTER_VARIABLE with powershell, command will not execute properly

Document ID : KB000088223
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
When using the REGISTER_VARIABLE with the powershell, powershell command will not properly execute.

Error:
c:\>C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe C:\AE\Agents\Windows\Resources\0100\0001064286\0001064286_0001.ps1 
Missing expression after ','.
At C:\AE\Agents\Windows\Resources\0100\0001064286\0001064286_0001.ps1:7 char:16
5
+     command = "C:\\AE\\Agents\\Windows\\bin\\UCXJWX6M.EXE JNR=0001064286 MNR=
0100 PNR=2300 IPA=172.18.80.109 TYP=V VTYPE=T NAME=return_code# VALUE=\"%s\" " 
% ($bta, <<<<  )
    + CategoryInfo          : ParserError: (,:String) [], ParseException
    + FullyQualifiedErrorId : MissingExpressionAfterToken
Environment:
OS: Windows
Resolution:
In UC_EXT_INTERPRETERS_WINDOW script, place a space between the first single quote and the word POWERSHELL to make REGISTER_VARIABLE work.

For example:
if &$EXT_INTERPRETER# = ' POWERSHELL'