Log-off terminal services session remotely

There are times when you want to quickly log-off a number of terminal services sessions without having to log on to the server itself, perhaps because of the following error:

The terminal server has exceeded the maximum number of allowed connections.

Microsoft provide two useful command-line tools to view and terminate sessions, qwinsta (Query WINdoes STAtion) and rwinsta (Reset WINdows STAtion).
Continue reading Log-off terminal services session remotely