Remote Desktop: logoff all sessions of a user

remote desktopscriptingterminal-server

Somebody could provide me a tip on how could I make a script file (.cmd) which logs off the current user AND all other open sessions with same username?

E.g.: I'm logged into three TS sessions with username "JOHN". I wish to run a script (from my current session, without administrative privileges) which would logoff my current session and also the other two.

Ideas?

Best Answer

You should read this page. It has the full command line syntax for Terminal services

http://technet.microsoft.com/en-us/library/cc775998%28WS.10%29.aspx