I realize this is old, but this helped me and this is the first link in Google that came up
This should cover everyone, even servers I believe. The number corresponds to the RDP session. 0=console and 1+2=other sessions. Depending on how you connect to your computer determines which session you use so running all 3 should work to disconnect everyone.
Last line if optional if you want to lock screen.
Paste all of this into bat file then run when you want to disconnect from RDP
tscon 0 /dest:console
tscon 1 /dest:console
tscon 2 /dest:console
Rundll32.exe User32.dll,LockWorkStation