new-pssession | WSMAN Limit change

This topic contains 4 replies, has 2 voices, and was last updated by Profile photo of H Man H Man 5 months, 2 weeks ago.

  • Author
    Posts
  • #44320
    Profile photo of H Man
    H Man
    Participant

    Hello

    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
    [pre]
    $s = new-PSSession -computername $($Ping.Online) -Credential $Credential
    [/pre]

  • #44324
    Profile photo of Don Jones
    Don Jones
    Keymaster

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

  • #44346
    Profile photo of H Man
    H Man
    Participant

    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
    Profile photo of Don Jones
    Don Jones
    Keymaster

    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
    Profile photo of H Man
    H Man
    Participant

    Thank you Don! I will give that a try.

You must be logged in to reply to this topic.