Solved

vb script or powershell script to find out last authentication on windows 2003 network

Posted on 2010-11-16
1
673 Views
Last Modified: 2012-05-10
Hello, when you logon to a windows 2003 domain, you can find very easy last logon time with different scripts for example lastlogontimestamp. But some users are working in a different and accessing servers in the other domain. In that case, lastlogontimestamp is not working. Can someone advise how to find out the last authentication time of that user?
0
Comment
Question by:Davy_VK_72
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 27

Accepted Solution

by:
KenMcF earned 500 total points
ID: 34150829
The two attributes to look at are lastlogon and lastlogontimestamp. The differnce is that lastlogontimestamp is replicated to all DCs every 9-14 days, lastlogon is not replicated so you will need to query every DC. These are both for interactive logons. If you are looking for other kinds of login you will need to enable auditing and comb through event logs.

I would use adfind or powershell with the quest AD cmdlets to get lastlogontimestamp so there would be no decoding to do

adfind with the -tdc switch - I think that is the correct switch, i would have to verify.
Quest - get-qaduser lastlogontimestamp | ft lastlogontimestamp


For the event logs you could use something like splunk

http://www.splunk.com/
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
There are times when we need to generate a report on the inbox rules, where users have set up forwarding externally in their mailbox. In this article, I will be sharing a script I wrote to generate the report in CSV format.
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question