Skip to content
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

PowerShell hangs it if tries to prompt #177

Open
HowardPWardinkle opened this issue Aug 30, 2017 · 0 comments
Open

PowerShell hangs it if tries to prompt #177

HowardPWardinkle opened this issue Aug 30, 2017 · 0 comments

Comments

@HowardPWardinkle
Copy link

HowardPWardinkle commented Aug 30, 2017

When running a PS script that inadvertently prompts (such as missing parameters), it will hang forever.

winrm/init.py around line 52 should add NonInteractive to have it error out instead of hanging forever.

rs = self.run_cmd('powershell -NonInteractive -encodedcommand {0}'.format(encoded_ps))

To test it run this PowerShell command Get-Content Since no parameters are supplied, it will try to prompt and hang pywinrm

@HowardPWardinkle HowardPWardinkle changed the title PowerShell hangs if tries to prompt PowerShell hangs it if tries to prompt Aug 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants