-
Notifications
You must be signed in to change notification settings - Fork 756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hang / crash when powershell is executed from cmd via ssh (Windows 10 Pro) #166
Comments
like @manojampalam said in this issue, you can expect a better working solution end of May |
Try the following: That's telling Powershell to redirect its IO streams through std IO. |
This is explained in https://github.com/PowerShell/Win32-OpenSSH/wiki/ssh.exe-examples |
Thank you. Now it works: http://filmy.elektroda.net/48_1458924598.mp4 Only one question mark: why 'new line' (enter) works so oddly ? |
the 'new line' should work better with the latest version. I put in a work around for now. |
I had issues when execution PowerShell scripts from a .bat script that I started via a SSH session. Steps:
Files
@echo off
echo Starting
cmd.exe /C powershell.exe -File "file1.ps1"
echo Done with file1
cmd.exe /C powershell.exe -File "file2.ps1"
echo Done with file2
Write-Host "EOF file1"
Write-Host "EOF file2" Script would only print:
And hangs. I had to press [Enter] for the
And once more for the
In my real use case, the stuff the My solution:Use the
@echo off
echo Starting
cmd.exe /C powershell.exe -InputFormat None -File "file1.ps1"
echo Done with file1
cmd.exe /C powershell.exe -InputFormat None -File "file2.ps1"
echo Done with file2 Outputs:
Let's hope this help someone. |
Dears
I have on my remote Win 10 SSH installed follow instruction below:
https://github.com/PowerShell/Win32-OpenSSH/wiki/Install-Win32-OpenSSH
Connection to cmd works perfectly but after powershell is executed (from cmd) then connection looks like below (no commands can be executed - looks like no response from remote cmd).
http://filmy.elektroda.net/58_1458919094.mp4
Is this a bug? Please give me some hints / or please support me somehow.
Thank you and best regards.
Mariusz
The text was updated successfully, but these errors were encountered: