Errors – Oh My — I keep getting errors…

Welcome Forums General PowerShell Q&A Errors – Oh My — I keep getting errors…

Viewing 3 reply threads
  • Author
    • #236350
      Topics: 6
      Replies: 7
      Points: 71
      Rank: Member

      I have a really simple code block…

      $status = 1
      Write-Output "hello world"

      The code works fine but I get $Errors – 3 of them – I paste one or the errors here.

      System.Management.Automation.CommandNotFoundException: The term '__Invoke-ReadLineForEditorServices' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
      at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
      at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
      at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection1 input, PSDataCollection1 output, PSInvocationSettings settings)
      at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection1 input, PSDataCollection1 output, PSInvocationSettings settings)
      at System.Management.Automation.PowerShell.InvokeWithDebugger(IEnumerable1 input, IList1 output, PSInvocationSettings settings, Boolean invokeMustRun)
      at System.Management.Automation.ScriptDebugger.ProcessCommand(PSCommand command, PSDataCollection`1 output)
      at Microsoft.PowerShell.EditorServices.Services.PowerShellContext.PowerShell5Operations.ExecuteCommandInDebugger[TResult](PowerShellContextService powerShellContext, Runspace currentRunspace, PSCommand psCommand, Boolean sendOutputToHost, Nullable`1& debuggerResumeAction)
      at Microsoft.PowerShell.EditorServices.Services.PowerShellContextService.ExecuteCommandInDebugger[TResult](PSCommand psCommand, Boolean sendOutputToHost)
      at Microsoft.PowerShell.EditorServices.Services.PowerShellContextService.<ExecuteCommandAsync>d__89`1.MoveNext()

      There are two other errors which I can share as well.


      Here is the version info of VSC…

      Version: 1.46.0 (system setup)
      Commit: a5d1cc28bb5da32ec67e86cc50f84c67cc690321
      Date: 2020-06-10T09:03:20.462Z (1 wk ago)
      Electron: 7.3.1
      Chrome: 78.0.3904.130
      Node.js: 12.8.1
      OS: Windows_NT x64 10.0.19041

      Here is a screen shot of the IDE:

    • #240125
      Senior Moderator
      Topics: 9
      Replies: 1244
      Points: 4,480
      Helping Hand
      Rank: Community Hero

      Hope you are using VSCode integrated Powershell Console and this is a PSreadLine related issue I think. Are you getting the same behavior in a normal PowerShell console.

    • #240800
      Topics: 6
      Replies: 7
      Points: 71
      Rank: Member

      Any pointers on how to fix that?

    • #240848
      Topics: 0
      Replies: 2
      Points: 10
      Rank: Member
Viewing 3 reply threads
  • You must be logged in to reply to this topic.