Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Windows Server » microsoft.public.windows.server.scripting
Thread: Determine last login time for a user on a Terminal Services server

HTVi
TV Discussion Newsgroups

Determine last login time for a user on a Terminal Services server
Cameron <cambennett[ at ]gmail.com> 4/17/2007 7:02:10 PM
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

Re: Determine last login time for a user on a Terminal Services server
"Al Dunbar" <AlanDrub[ at ]hotmail.com.nospaam> 4/17/2007 11:59:39 PM

"Cameron" <cambennett[ at ]gmail.com> wrote in message
news:1176836530.863753.53690[ at ]n59g2000hsh.googlegroups.com...
[Quoted Text]
>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:

([ at ]for /f "delims=~" %X in ('dir/a/s/b ntuser.dat') do [ at ]echo %~tX "%X")|[ at ]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


Re: Determine last login time for a user on a Terminal Services server
"Marty List" <usenet[ at ]optimumx.com> 4/19/2007 2:06:25 AM

Try my freeware tool NetUsers.exe:
http://www.optimumx.com/download/


[Quoted Text]
>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.



"Cameron" <cambennett[ at ]gmail.com> wrote in message
news:1176836530.863753.53690[ at ]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
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen