Invoke-command fails on linux when using more than 32 servers

i’ve setup psremoting on linux servers and have hundreds. invoke-command works when using 32 or less servers. anymore than that will give this error OpenError: An error has occurred which PowerShell cannot handle. A remote session might have ended. on most of them. It runs perfectly fine if I have less than 32 servers so I’m sure there’s a limit I’m hitting. I’m running this command from a ubuntu 22 server against other ubuntu 22 servers with powershell remoting installed. Here’s the command that just returns the hostname. the $servers var simply holds a list of my target servers.

invoke-Command -host $servers -script {hostname}

uncharted territory for me but it sounds like it’s related to the -ThrottleLimit parameter.
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/invoke-command?view=powershell-7.4#-throttlelimit

When reading about it it sure sounds like it should handle it automatically and if it is passed more than 32 targets it would just chunk through them. Perhaps worrh opening an issue on github.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.