diff --git a/src/Microsoft.PowerShell.PSReadLine/ConsoleLib.cs b/src/Microsoft.PowerShell.PSReadLine/ConsoleLib.cs index 98b9eb66586..4451f95a1f3 100644 --- a/src/Microsoft.PowerShell.PSReadLine/ConsoleLib.cs +++ b/src/Microsoft.PowerShell.PSReadLine/ConsoleLib.cs @@ -727,9 +727,7 @@ internal static CONSOLE_FONT_INFO_EX GetConsoleFontInfo(SafeFileHandle consoleHa if (result == false) { - int err = Marshal.GetLastWin32Error(); - Win32Exception innerException = new Win32Exception(err); - throw new Exception("Failed to get console font information.", innerException); + _getCurrentConsoleFontExApiAvailable = false; // api not supported on ServerCore } return fontInfo; }