Solved

Auto Logoff Windows 2003 Terminal Server Users at Certain Time

Posted on 2008-10-23
2
1,265 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
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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

The question has been asked on multiple occasions as to how best to do printing in a remote desktop or terminal services environment.   It seems that this particular question has plagued several people and most especially as Terminal Services, as…
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

863 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now