Solved

Auto Logoff Windows 2003 Terminal Server Users at Certain Time

Posted on 2008-10-23
2
1,272 Views
Last Modified: 2013-11-21
Hi Guys,

I have Windows 2003 Terminal Server, users connecting through thin client to this server. Our 2nd shift finishes at 2:00am and I want all users to be logged off from the server. Most of the user disconnect their session inplace of logging off.

What I need is to logoff all active users other than "Administrator" at 2:00am.

I m aware of to set idle session & disconnected session time limits and don't want to use that approach as the users complain about termination of their sessions

Thanks for your help

Gill.
0
Comment
Question by:pjsgill
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 31

Accepted Solution

by:
Henrik Johansson earned 125 total points
ID: 22804470
Copy the code snippet into notepad and save it as logoffsessions.cmd and create a scheduled task that execute the script at the given time.
for /F "tokens=3" %%a in ('quser^|find /v "USERNAME"^|find /v /i "administrator"') do rwinsta %%a

Open in new window

0
 

Author Closing Comment

by:pjsgill
ID: 31509235
Thanks, it worked for me
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My previous article  (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/Windows_Server_2008/A_4466-A-beginners-guide-to-installing-SCCM2007-on-Windows-2008-R2-Server.html)detailed one possible method to get SCCM 2007 installed an…
Remote Apps is a feature in server 2008 which allows users to run applications off Remote Desktop Servers without having to log into them to run the applications.  The user can either have a desktop shortcut installed or go through the web portal to…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question