Link to home
Start Free TrialLog in
Avatar of Ray Padilla
Ray PadillaFlag for United States of America

asked on

Script to disconnect RDP sessions

I have about 12 users that will normally remote into our server to do some quickbooks work, I need then to log off the server when they are done working, this usually does not happen they will exit from QB but leave the session open. This causes me problems as I have several applications doing automated task every night. I need a batch file/Script that I can set to run every night at a certain time and completely log them off the server except myself the admin. As a courtesy I would like to send everyone logged on a quick message letting them know that "the server will log you off save your work you have 2 minutes"  then log everyone off the server again EXCEPT the admin.  I am running a Windows 2012 R2 server.
SOLUTION
Avatar of Will Szymkowski
Will Szymkowski
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ray Padilla

ASKER

We are not using the server with any type of LDAP it is setup as an application server
You do not do this on the server you use Group Policy Management Console for this.  

If you do not have an AD environment you can. Accomplish the same thing using local policy.

Use gpedit.msc to open local policy.

Follow the rest of the steps from the first link I posted.

Will.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial