Skip to content

Commit

Permalink
Hide the console for WinRM remoting (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveL-MSFT authored Dec 15, 2022
1 parent 6280a69 commit 06d8c01
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/powershell-native/nativemsh/pwrshplugin/pwrshclrhost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ unsigned int PowerShellCoreClrWorker::LaunchClr(
{
// Allocate a console so that the codepage is setup correctly
AllocConsole();
HWND console = GetConsoleWindow();
if (console != NULL)
{
// Hide the console window
ShowWindow(console, SW_HIDE);
}

return commonLib->LaunchCoreCLR(hostWrapper, hostEnvironment, friendlyName);
}

Expand Down

0 comments on commit 06d8c01

Please sign in to comment.