Orchestrator: Solved 'Cannot invoke this function because current host does not implement it'

Published March 30, 2015 by FoxDeploy

This is a very frustrating error in SCORCH, Opalis, Orchestrator, whatever you want to call it. Bring on SMA because I’ve had enough!

Symptom

When running a PowerShell Script or an Exchange Administrative PowerShell Command in PowerShell, the activity will fail with:

‘Cannot invoke this function because the current host does not implement it.’

Cause

The reason for this is that the command you’re trying to run is trying to send confirmation back to the shell (end-user) to provide Confirmation before enacting a change.  The Orchestrator host doesn’t have any mechanism to prompt for change, and thus the message we see.

As it turns out, the error message really was trying to help us, but just incredibly poorly written.

Resolution

There is a quick fix available for this, add either -Confirm:$false or -Force to your cmdlet, based on the command you’re using.

Suggestion: replace this message with ‘This cmd requires user feedback, and cannot be automated in it’s current form. Try reading the Get-Help page for the cmdlet used, and consider adding -Force or -Confirm:$false if your cmdlet requires it’.


Microsoft MVP

Five time Microsoft MVP, and now I work for the mothership


Need Help?

Get help much faster on our new dedicated Subreddit!

depicts a crowd of people in a night club with colored lights and says 'join the foxdeploy subrreddit today'


Blog Series
series_sml_IntroToDsc
series_sml_PowerShellGUI series_sml_IntroToRaspberryPi Programming series_sml_IntroToWindows Remote Management Series The Logo for System Center Configuration Manager is displayed here Depicts a road sign saying 'Learning PowerShell Autocomplete'




Blog Stats