- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Microsoft
- >
- Re: Is there a command similar to UX "last" to use...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-19-2006 10:29 PM
тАО01-19-2006 10:29 PM
Either that or, if I run the command on a given server, which users where logged on to that given server.
Thank you much.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-19-2006 11:10 PM
тАО01-19-2006 11:10 PM
Re: Is there a command similar to UX "last" to use agains a TS?
eventquery -V -L security /FI "source eq security AND id eq 500".
Then you can use another program like perl to filter the data (Not too easy like unix isn't it)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-19-2006 11:47 PM
тАО01-19-2006 11:47 PM
Re: Is there a command similar to UX "last" to use agains a TS?
thank you.
I'll check out and get back with feedback.
slds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2006 04:07 AM
тАО01-20-2006 04:07 AM
Solutionhttp://www.windowsitpro.com/Article/ArticleID/15113/15113.html
In case the link goes away though....
Save the following text into file userlogin.vbs
' List last logon times
' 2001-03-27 John Savill, Jakob Hussfelt http://www.ntfaq.com
On Error Resume Next
sEnterDCs = "SAVILLTECH,SAVILLNT02"
sObjects = Split(sEnterDCs, ",")
Set oDomain = GetObject("WinNT://" & sObjects(0))
oDomain.Filter = Array("User")
WScript.Echo "Showing last login times of accounts from: " & oDomain.Name & vbNewLine
For Each oDomainItem In oDomain
sUsrLogin = oDomainItem.LastLogin
If UBound(sObjects) >= 1 Then
For ii = 1 To UBound(sObjects)
Set oUsr = GetObject("WinNT://" & sObjects(ii) & "/" & oDomainItem.Name & ",user")
If oUsr.LastLogin > sUsrLogin Then sUsrLogin = oUsr.LastLogin
Next
End If
WScript.Echo "Username: " & Left(oDomainItem.Name & Space(22),22) & "Last login: " & FormatDateTime(sUsrLogin)
Next
In line 'set oDomain = GetObject("WinNT://SAVILLTECH")' you should change SAVILLTECH to your domain name.
To run type the following:
C:\> cscript userlogin.vbs
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-23-2006 01:15 AM
тАО01-23-2006 01:15 AM
Re: Is there a command similar to UX "last" to use agains a TS?
thank you much.
This is what I was looking for.
I didn't get it to work, though.
It didn't retrieve any record.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-23-2006 05:42 AM
тАО01-23-2006 05:42 AM
Re: Is there a command similar to UX "last" to use agains a TS?
Showing last login times of accounts from: 11XEDDTC
Username: aceweb Last login: 12/14/2005 12:35:15 PM
Username: aconner Last login: 10/26/2004 4:59:59 PM
Username: Administrator Last login: 10/26/2004 4:59:59 PM
Username: ahonker Last login: 1/23/2006 9:57:18 AM
Username: ajmaster Last login: 1/23/2006 11:32:23 AM
Username: ajvalent Last login: 1/23/2006 11:07:04 AM
Username: akwood Last login: 1/23/2006 10:26:32 AM
Username: apinst Last login: 1/23/2006 11:35:30 AM
Make sure that on the domain line, that you change it to your DC's:
sEnterDCs = "11XEDDTC,CEATCBDC"
And run the vbs file with credentials that have privledges on the DC's.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2008 08:04 AM
тАО07-28-2008 08:04 AM
Re: Is there a command similar to UX "last" to use agains a TS?
I also ran this command for a particular user; See the output here:
net user ezapata /domain | findstr /i logon
Logon script
Last logon 7/28/2008
Thought it could be of help.
Tnks.