WinRM "concurrent operations" increase to eventual failure
Concurrent operations on an open shell always increase (eg, for each command run) even when the Terminate signal message is sent and (apparently) properly processed after each command. This eventually causes the MaxConcurrentOperationsPerUser quota to be hit, requiring a new shell to be created.
A simple reproduction using pywinrm is available at: https://github.com/diyan/pywinrm/issues/124. I'm guessing there's just something wrong with the way the Terminate signal is being sent by pywinrm, but the server appears to be happy with it.
To run the repro, ensure python and pip are available, create a file with the repro code (and adjust the wsman endpoint, username, password, and change the "transport" arg to ntlm if basic isn't configured) then do:
pip install pywinrm==0.2.0
Lower the MaxConcurrentOperationsPerUser to something less than 100 to hit the repro more quickly.