PowerShell Server: Some commands cause the console to hang (e.g., Vim, Emacs, etc)

Problem Description

Attempting to use some tools, such as the editors Vim or Emacs, causes PowerShell Server to hang until the executed command is forcefully stopped (e.g., CTRL+C).

Cause

This issue is actually a limitation of the manner in which PowerShell operates. Fundamentally, any console application that either uses explicit input or takes over the console using the Win32 Console APIs (instead of using the raw input and output streams) is going to experience this behavior.

This behavior can also be observed in the PowerShell ISE, demonstrating that the behavior is an issue inherent to PowerShell itself rather than PowerShell Server.

We appreciate your feedback.  If you have any questions, comments, or suggestions about this article please contact our support team at kb@nsoftware.com.