Home All Groups Group Topic Archive Search About

Determine last login time for a user on a Terminal Services server



Author
17 Apr 2007 7:02 PM
Cameron
I have a Windows 2000 server that I want to determine the last time a
user logged into it.  I have found some scripts that query the domain
but this has all users, not just the ones i am looking for.

Any suggestions are greatly appreciated.

CB

Author
17 Apr 2007 11:59 PM
Al Dunbar
"Cameron" <cambenn***@gmail.com> wrote in message
news:1176836530.863753.53690@n59g2000hsh.googlegroups.com...
>I have a Windows 2000 server that I want to determine the last time a
> user logged into it.  I have found some scripts that query the domain
> but this has all users, not just the ones i am looking for.

.... and it typically does not indicate where each user logged in...

> Any suggestions are greatly appreciated.

Try logging on to the server with an adminstrative account, and typing this
command:

(@for /f "delims=~" %X in ('dir/a/s/b ntuser.dat') do @echo %~tX "%X")|@sort

Assuming the server is configured with a date and time format that is
sortable as text, this will display a list of all profiles with the most
recently logged in to one at the last.

/Al
Author
19 Apr 2007 2:06 AM
Marty List
Try my freeware tool NetUsers.exe:
http://www.optimumx.com/download/


>NetUsers.exe /?

Network Users [Version 1.23]

Displays a list of users logged on to a specified Windows system.


The syntax of this command is:

NetUsers.exe [\\computername \\...] [/history] [/local] [/verbose]

\\computername Allows you to query remote systems. Multiple computers
                can be specified, each separated by a space.
/history|/h    Displays the user accounts that have logged on in the past.
If
                history is omitted, currently logged on users are displayed.
/local|/l      Includes local user accounts in the output, by default they
                are skipped. In a domain these are usually service accounts.
/verbose|/v    Reports non-fatal problems as errors (such as deleted
accounts)


An argument of /? or -? displays this syntax and returns 1.
A successful completion will return 0.



Show quote
"Cameron" <cambenn***@gmail.com> wrote in message
news:1176836530.863753.53690@n59g2000hsh.googlegroups.com...
>I have a Windows 2000 server that I want to determine the last time a
> user logged into it.  I have found some scripts that query the domain
> but this has all users, not just the ones i am looking for.
>
> Any suggestions are greatly appreciated.
>
> CB
>

AddThis Social Bookmark Button