I'm trying to manage user sessions across 10+ 2012 R2 RDSH Hosts inside a vWorkspace 8.6.1 Farm without a 2012 R2 Connection Broker Role.
I am concerned that adding the Connection Broker, creating a pool, and adding servers to it will interfere with the policy settings and load balancing rules setup in vWorkspace (two drivers, one car). And the vWorkspace controls are not intuitive enough to deploy to tier 1 support and somewhat clunky.
This wasn't a problem in 2008 and previous versions but now Microsoft has replaced all the previous standalone tools and seemingly forced their Server Manager / Connection Manager role setup.
Looking for a powershell script (or other) option to manage user logoffs, shadowing sessions, etc (across the pool) that doesn't reference a connection broker. Most scripts / tools for powershell now reference a Collection: TechNet Get-RDUserSession
Get-RDUserSession -ConnectionBroker "rdcb.contoso.com"
Best Answer
You can actually use
Get-RDUserSession
for this task. Just refer to the collectionname, not to the connectionbrokerthis will get you the session IDs of all RDP connections
then you can shadow those with this command (in this example, sessionid
"3"
is shadowed)To make your life easier you could use a function that looks for the UserName.
so you command would be
if you have only one RDS collection use this
then you don't have to refer to the collectionname, only the username
You can even go further and add switches to your function
then you could use this function for everything you want. shadowing, logging off, etc.