RDP Load balancing (pool routing) based on user or hostname
We have a Microsoft TS cluster of 4 machines with a session directory and load balancing across this cluster is handled by our LTM. Everything works really well and overall we are very happy with the solution.
These existing 4 machines have software installed that enables the use dual monitors and we would like to bring another 2 TS servers online but not have to install this additional dual monitor software. The idea that we have is to put our users into 2 different groups: One that has dual monitors and one that doesn't.
When the user tries to connect to the TS using their RDP client we would like to:
1) Intercept the RDP request,
2) Extract the username,
3) Check against the AD to see what group the user is in and then,
4) Depending on the response send them the a dual_monitor_pool or a single_monitor_pool.
I have seen posts that do this type of interception and extraction for purpose of persistence but the other two parts (1) querying the Active Directory and (2) selecting a pool based on the resultant search of group is something that I haven't really been able to figure out.
Thanks in advance