new-pssession | WSMAN Limit change

Welcome Forums General PowerShell Q&A new-pssession | WSMAN Limit change

This topic contains 4 replies, has 2 voices, and was last updated by

 
Participant
2 years, 5 months ago.

  • Author
    Posts
  • #44320

    Participant
    Points: 0
    Rank: Member

    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

    $s = new-PSSession -computername $($Ping.Online) -Credential $Credential
    
  • #44324

    Keymaster
    Points: 1,704
    Helping HandTeam Member
    Rank: Community Hero

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

  • #44346

    Participant
    Points: 0
    Rank: Member

    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

    Keymaster
    Points: 1,704
    Helping HandTeam Member
    Rank: Community Hero

    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

    Participant
    Points: 0
    Rank: Member

    Thank you Don! I will give that a try.

The topic ‘new-pssession | WSMAN Limit change’ is closed to new replies.