Our company has a backup that runs at night around 10.Lately people have been rushing out of here and leaving their computer on and logged into our accounting system. When this happens the back up cannot run.I want to disconnect people from the server at 9 PM. I would like to do this server side without going to each PC to write shutdown scripts. The accounting system doesn't have the ability to kick people of the file so that is out of the question. I've played with the user groups but we don't really have users on the server, its mainly just a file share for everyone. Maybe I can just do all guests?
4/1/2010 9:23:55 AM
does http://weblogs.asp.net/owscott/archive/2003/12/30/Managing-Terminal-Services-Sessions-Remotely.aspx help you get there? that's what i usually do to kick people off. i dunno if automating it would get tricky[Edited on April 1, 2010 at 9:29 AM. Reason : .]
4/1/2010 9:28:51 AM
Create a batch script that forces the network share to drop, take the backup, run another script to recreate the share. The net share command should do it (net help share for more info).Lazy mode: Restart the server and take the backup as soon as it comes up.from the description i was assuming some shared file they access from a client on their machine, rather than a terminal server session.If you want to log off terminal server sessions you can use the logoff command or WMI. WMI might be better because you can get a list of logged in users, iterate over them, and kick each out. [Edited on April 1, 2010 at 9:32 AM. Reason : .]
4/1/2010 9:30:19 AM
You could wind up with corrupted data in the db if you just reboot the server. But that's what the previous backup is for, and if it does happen maybe it would teach these dumb motherfuckers to log out before they leave.
4/1/2010 9:33:14 AM
4/1/2010 10:02:31 AM
there's a way to do this, i've done it beforei'll check my script repository at work
4/1/2010 10:26:22 AM
thanks for the tips guys - will look into things.
4/1/2010 10:58:42 AM
Does the accounting system use a check-out based session? If so you could end up with a huge mass of checked out files that haven't been unlocked from someone exiting correctly. If it's transaction based you should be good to go.It is tax season though, are they running scripts or something that take all night to crunch?
4/1/2010 11:12:08 AM
how many computers are you talking about here?
4/1/2010 11:16:34 AM
4/1/2010 11:30:31 AM
Yeah, there's definitely a way to do this in an automated fashion (connection timeouts). If evan can't pull up a solution, I'll check back in a few days and go figure it out.
4/1/2010 5:37:22 PM
group_policy\administrative_templates\windows_components\terminal_services\sessionsthere should be a policy in there
4/1/2010 5:54:00 PM
^Thank you. "Set time limit for active but idle Terminal Services sessions""Terminate session when time limits are reached"
4/1/2010 9:27:24 PM
From the Server, try this:Start > Run > Copy/Paste this into Run: "%SystemRoot%\system32\tscc.msc /s" > Click OK > Then Right-Click "RDP-Tcp" on the right pane, under the Connection Column > Click Properties > Click Sessions Tab > Increase your Idle session limit to "X" minutes, and specify how to handle them by either "Ending Session" or "Disconnecting Session." That should address the issue if it is a TS session problem.This may be redundant info, but oh well.[Edited on April 2, 2010 at 10:08 AM. Reason : -]
4/2/2010 10:07:59 AM