SCORCH – System Center Orchestrator Error “Cannot invoke this function because the current host does not implement it”

Summary

When implementing PowerShell scripts within Microsoft System Center Orchestrator (SCORCH) runbooks, you may encounter the following error during execution:

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

This issue typically arises due to certain PowerShell commands or functions being unsupported in the SCORCH runbook execution environment.

More Information

The error is triggered by a Write-Host statement executed outside of an Invoke-Command block or outside a second PowerShell session within the runbook.

In your case, Write-Host was included for testing purposes to view script output. However, when Write-Host runs, PowerShell attempts to write to the host console—which does not exist in the Orchestrator runtime environment—resulting in the following error:

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

Solution

Comment out or remove all Write-Host statements that are:

    • Outside of Invoke-Command blocks
    • Outside of separate PowerShell sessions

Instead, use Write-Host or write to a log file if output tracking is needed during testing or debugging.

Leave a Reply