Author Posts

June 22, 2016 at 12:57 pm


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

June 22, 2016 at 12:58 pm

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

June 22, 2016 at 2:31 pm

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?

June 22, 2016 at 11:52 pm

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.

June 23, 2016 at 2:05 am

Thank you Don! I will give that a try.