Solved

Auto Logoff Windows 2003 Terminal Server Users at Certain Time

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

Why spend so long doing email signature updates?

Do you spend loads of your time carrying out email signature updates? Not very interesting are they? Don’t let signature updates get you down. Let Exclaimer Cloud - Signatures for Office 365 make managing email signatures a breeze.

Join & Write a Comment

Some time ago I faced the need to use a uniform folder structure that spanned across numerous sites of an enterprise to be used as a common repository for the Software packages of the Configuration Manager 2007 infrastructure. Because the procedu…
On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 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

13 Experts available now in Live!

Get 1:1 Help Now