I created a script-action that should edit a word document (2016, 32-bit). The code of this script works as expected if run it in powershell (PS 5.1.14393.3866) manually same for starting script with Runbook-Tester. For sure I started powershell 32-bit in Orchestrator Runbook Service account context. But if Orchestrator (2016) starts the script it will not finish. I reduced the code example to a minimum. Orchestrator starts word as background task but never quit the application and the process is keep running till I close word via task manager.
$Word = New-Object -ComObject Word.Application
$Word.Visible = $true
Start-Sleep -s 10
$Word.Quit()
Are there different permissions between running script in Runbook-Tester or Powershell (service account context) and orchestrator?
EDIT: I guess the problem is that orchestrator run a powershell like a remote shell because the error pattern is the same as decribed here 7 years ago.