new-pssession | WSMAN Limit change

This topic contains 4 replies, has 2 voices, and was last updated by  H Man 2 years ago.

  • Author
  • #44320

    H Man


    I have been using the new-pssession cmdlet for years now with great success.

    In my current environment we have 2500 machines I have been connecting to with out issue.

    Something changed and now I can only connect to a group session of 1500 computers and the new-pssession cmdlet just hangs @ 1500 computers. Does not error out just keeps running

    Any troubleshooting tips would be greatly appreciated
    $s = new-PSSession -computername $($Ping.Online) -Credential $Credential

  • #44324

    Don Jones

    Is it just any 1500 machines? Have you verified that it isn't a particular computer, or set of them, that's hanging?

  • #44346

    H Man

    Its @ 1500 it stops Im pining my whole domain and passing the online computers to new-pssession.

    I'm not sure how I would go about getting the set thats not connecting, because the new-pssession does not complete.

    Thx for the response Don , what the best way to go about isolating the issues?

  • #44475

    Don Jones

    Well, the thing would be to do one at a time. So assuming $nodes has the computer names...

    $sessions = @()
    $verbosepreference = 'continue'
    $credential = get-credential
    foreach ($node in $nodes) {
      try {
        write-verbose "Trying $node"
        $sessions += new-pssession -computer $node -error stop -credential $credential
      } catch {
        write-verbose "$node failed"
        $node | out-file errors.txt -append

    Something vaguely like that, technique-wise.

  • #44495

    H Man

    Thank you Don! I will give that a try.

You must be logged in to reply to this topic.