Runing Powershell Scripts in Opalis \ Orchestrator – “Cannot invoke this function because the current host does not implement it”

Facebooktwitterredditpinterestlinkedinmail

Heres a short tip. When working with “RUN .Net Script” component in Opalis \ Orchestrator it’s important to remember that all the running process is behind the scene which means that any console interact like keyboard input & screen output like write-host won’t work.

In addition to this declare, running scripts with any interacting commands will fail your component in Opalis \ Orchestrator with the following error:

“Cannot invoke this function because the current host does not implement it”

To avoid that, if you still want to save all these interacting commands, add these lines before any interacting command:

Let’s say you want to print some line for tests and you don’t want to remove it even the Opalis \ Orchestrator won’t show it, it goes like this :

if ($host.Name -eq “ConsoleHost”)
{
write-host ‘My very Important Line !’
}

One thought on “Runing Powershell Scripts in Opalis \ Orchestrator – “Cannot invoke this function because the current host does not implement it”

  1. When someone writes an post he/she maintains the idea of a user in his/her mind that how a user can be aware of it.
    So that’s why this piece of writing is great.
    Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *