pywinrm
pywinrm copied to clipboard
PowerShell hangs it if tries to prompt
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