diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostRawUserInterface.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostRawUserInterface.cs index afd050e74..1cbee3a30 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostRawUserInterface.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostRawUserInterface.cs @@ -1699,11 +1699,14 @@ namespace Microsoft.PowerShell } /// - /// This API resets the input buffer. In this example this - /// functionality is not needed so the method returns nothing. + /// This API resets the input buffer. /// public override void FlushInputBuffer() { + if (!Console.IsInputRedirected) + { + Console.OpenStandardInput().Flush(); + } } ///