Some native Windows programs, such as programs with a user interface, console applications that prompt for input, and console applications that use the Win32 console API, do not work correctly in the Windows PowerShell remote host. When you use these programs, you might see unexpected behavior, such as no output, partial output, or a remote command that does not complete and causes the session to become unresponsive ("hang").

To interrupt an unresponsive command

  • Type CTRL + C. To view any errors that might have been reported, type $error in the local session and the remote session.

    For example, the following commands causes the session to become unresponsive or "hang." The first command uses the Enter-PSSession cmdlet to start an interactive session on the Server01 computer. The second command run a "Notepad" command in the remote session. This causes the session to become unresponsive or "hang."

      Copy Code
    C:\PS> enter-pssession -computerName Server01
    [Server01] PS C:\Users\User01\Documents> Notepad

    To interrupt the command, type CTRL + C.