lholman/AutoBot — Issue #7: Add support for "write-host"
Author: pointytwist
Created: 2011-11-22 11:46:45+00:00
State: open

Using write-host inside a script results in an exception as follows:

System.Management.Automation.Host.HostException: Cannot invoke this function because the current host does not implement it.
at System.Management.Automation.Internal.Host.InternalHostRawUserInterface.ThrowNotInteractive()
at System.Management.Automation.Internal.Host.InternalHostRawUserInterface.get_ForegroundColor()
at Microsoft.PowerShell.Commands.ConsoleColorCmdlet.get_ForegroundColor()
at Microsoft.PowerShell.Commands.WriteHostCommand.PrintObject(Object o)
at Microsoft.PowerShell.Commands.WriteHostCommand.PrintObject(Object o)
at Microsoft.PowerShell.Commands.WriteHostCommand.ProcessRecord()
at System.Management.Automation.Cmdlet.DoProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()

Can autobot implement write-host so that it either just swallows the value, or maybe sends it to the autobot console for debugging?