Guest kam_ajit Posted February 2, 2008 Posted February 2, 2008 As i am doing one project in win server i need some help from forum and my requirement is Like i need to calculate user idle time. as my user's are connected in win server 2003 sp2 is there any option to count the user idle time and where they getting stored in server... -- kam_ajit ------------------------------------------------------------------------ kam_ajit's Profile: http://forums.techarena.in/member.php?userid=40895 View this thread: http://forums.techarena.in/showthread.php?t=906734 http://forums.techarena.in
Guest Richard Mueller [MVP] Posted February 2, 2008 Posted February 2, 2008 Re: Idle time kam_ajit wrote: > As i am doing one project in win server i need some help from forum and > my requirement is Like i need to calculate user idle time. as my user's > are connected in win server 2003 sp2 is there any option to count the > user idle time and where they getting stored in server... Each server keeps track of active sessions, and this includes idle time. However, the sessions come and go depending on activity, are only for the connection to the server (not logon time in the domain), and are a snapshot in time. Nowhere is idle time retained. If it helps, the following VBScript program outputs current session information on a given server: ========= Option Explicit Dim objServer, objSession, strServer strServer = "DeptServer" Set objServer = GetObject("WinNT://" strServer & "/LanmanServer") For Each objSession In objServer.Sessions Wscript.Echo "Session: " & objSession.Name _ & vbCrLf & " User: " & objSession.User _ & vbCrLf & " Computer: " & objSession.Computer _ & vbCrLf & " Connect Time: " & objSession.ConnectTime _ & vbCrLf & " Idle Time: " & objSession.IdleTime Next ========= After a user authenticates to a DC, for example, there is no longer a session connected to the machine, unless the user is currently accessing resources on the computer. Even then I have seen the sessions disappear if there is no traffic between the computers. -- Richard Mueller Microsoft MVP Scripting and ADSI Hilltop Lab - http://www.rlmueller.net --
Recommended Posts