Trying to locate the last Logged on User of a computer within a domain...
hello all,
far i've come with
dsquery * "ou=workstations,ou=xxx,ou=xxx,ou=xxx,ou=xxx,dc=xxx,dc=xxx,dc=xxx,dc=xxx" -filter "(&(objectcategory=computer)(objectclass=computer))" -limit 0 -attr samaccountname lastlogon operatingsystem
trying add user last logged these computers, chance have idea should add search critera in order display last logged on user?
hi,
i think it's not simple specify such search criteria because can't use attribute lastlogon or lastlogonattribute determine accurate last logon time of user.
the lastlogon attribute only reflects last interactive logon, not last network-based logon. lastlogontimestamp attribute reflects simple bind operations , ntlm network-based logons.
so may need extract logon events various dcs information. can use scripts or tool other mentioned achieve it.
a script sample:
http://gallery.technet.microsoft.com/scriptcenter/760c81d2-51c5-4fb1-909f-255949056308
regards,
cicely
Windows Server > Directory Services
Comments
Post a Comment