When attempting to preview a backend variable with a command like:
powershell -command "IF(Test-Path 'C:\automic') {write-host 'this path exists'} ELSE {Write-host 'this path does not exist'}"
an error shows in the up that says:
U01002531 Lines are not terminated in input text with CRLF: 'this path exists '.
When running a prep_process_var against this backend variable, the script might stay in a Resolving Variables status.
Automic Automation v24
This is because Write-Host is used to write to the console window which is not available with backend variables.
Using Write-Output or nothing will allow an output to be written. Either:
powershell -command "IF(Test-Path 'C:\automic') {write-output 'this path exists'} ELSE {Write-Output 'this path does not exist'}"
or:
powershell -command "IF(Test-Path 'C:\automic') {'this path exists'} ELSE {'this path does not exist'}"