Potential Bug: PowerShell v5 timeout on getting output of remoting session when connected using CredSSP
When connecting to a remote host using PowerShell Remoting and -Auth CredSSP, output of more than 21 objects will timeout when client is running PowerShell 5.0.
When connecting to a remote host using:
Enter-PSSession host.domain.local -Auth CredSSP -Cred domain\username
any command yielding up to 21 objects will work as expected. However, if there are more than 21 objects, the client console shows no output and will run into timeout. The same seems to be true for the output of Invoke-Command.
This can easily be reproduced entering the command:
0..20 # Works as expected
0..50 # Timeout!
0..1000|Measure-Object # OK, supposedly because output is summarized
This happens when the client is running PowerShell v5.0 and regardless of the PowerShell version of the remote host. Tested with PSVersion 5.0.10514.6 on Windows 8.1 and PSVersion 5.0.10240.16384 on Windows 10.
Since this issue does not occur without CredSSP or with PowerShell <v5.0 and since I did not find any documentation for this behavior, I suspect this to be a bug.
Juho Lehto commented
I believe I've been encountering this bug or something very close to it.
I have WMF 5.0 Production Preview and I've established remoting session to a server using CredSSP authentication. Then I run Get-ADUser cmdlet. Often I won't get back any output whatsoever from Get-ADUser when number of objects is significant.
But then again, sometimes I can get back thousands of objects without any issues.
Unreliability of this is really bugging me. Unfortunately at this time I do not know how well Invoke-Command works.