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

Commands and jobs blocked in Running state when powershell selected as shell on Windows Server 2019 #59

Open
igalvit opened this issue Jul 31, 2020 · 1 comment
Assignees

Comments

@igalvit
Copy link

igalvit commented Jul 31, 2020

I have several Windows Server 2012 R2 and 2019 servers in the same project. When I configure the executing node to use as a powershell shell and try to execute with a simple command like hostname or ls c:, on 2019 servers the command stays running all the time. I have to kill the job.

imagen

If I configure the shell as cmd and run the command ipconfig /all it runs without problems.

When I set the shell to powershell and run WinRM Check stop from both a job and bash it runs without problems either. I have checked the WinRM configuration and it is the same on all Windows servers.

I have updated the plugin to 2.0.8 downloading from this repository and I get the same errors.

imagen

@igalvit
Copy link
Author

igalvit commented Jul 31, 2020

I've been running tests with the pywinrm library and have been able to reproduce the problem.

import winrm

ps_script = """$strComputer = $Host
Clear
$RAM = WmiObject Win32_ComputerSystem
$MB = 1048576

"Installed Memory: " + [int]($RAM.TotalPhysicalMemory /$MB) + " MB" """

s = winrm.Session('https://<SERVER_FQDN>:5986/wsman', auth=('<USER>@<DOMAIN>', '<PASSWORD>'),transport='kerberos',server_cert_validation='ignore')
r = s.run_ps(ps_script)

@ltamaster ltamaster self-assigned this Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants