Get-RDUserSession - Not returning anything for one Collection

Viewed 14

If I run Get-RDUserSession From two of my three RDP Servers I get what I expect. If I run it in a third collection I get nothing, It takes it sweet time, but just returns to the command line. All three Server Collections are Win2019.

I can run the commands with the specific collection info with the same results

 Get-RDUserSession -CollectionName <collection1-name> -ConnectionBroker <broker1>
 Get-RDUserSession -CollectionName <collection2-name> -ConnectionBroker <broker2>
 Get-RDUserSession -CollectionName <collection3-name> -ConnectionBroker <broker3>

The third does not return data. I’m Logged into it, so I know there is a user on. Running with Get-RDUserSession -verbose -debug

 PS C:\Windows\system32> Get-RDUserSession -verbose -debug

VERBOSE: No user sessions were found matching the specified criteria.
1 Answers

Looking at the TerminalServices-SessionBroker-Client Event Log, I found the Following:

Remote Desktop Services failed to join the Connection Broker on server <original-ConnectionBroker>.
Error: Current async message was dropped by async dispatcher, because there is a new message which will override the current one.

<original-ConnectionBroker> was the Session-Host that was the First/Only Session-Host in the Collection when it was Created.

We added / and removed Some time ago. It looks like it was still trying to access for the Session Connections when the user logs in.

So to Fix this, I removed <session-host3> from the Collection. So no more Session Hosts in the Collection. Then Added <session-host3> back to the Collection. That Showed the Connection is the Collection again and then the Get-RDUserSession worked again and retuned the proper session connections.

Related