Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Script for every logon in the last 90 days

Reply
 
Old 09-05-2008   #1 (permalink)
rademr1


 
 

Script for every logon in the last 90 days

I am looking for a script I can run that will give me a list of every logon
for a certain OU for the last 90 days. I am running on a Windows 2000 Domain.

My System SpecsSystem Spec
Old 09-05-2008   #2 (permalink)
Richard Mueller [MVP]


 
 

Re: Script for every logon in the last 90 days


"rademr1" <rademr1@xxxxxx> wrote in message
news:C31980D5-1050-46E6-BF26-D6A8BF14B5EE@xxxxxx
Quote:

>I am looking for a script I can run that will give me a list of every logon
> for a certain OU for the last 90 days. I am running on a Windows 2000
> Domain.
This cannot be done after the fact. You can document the last logon dates
for all users in the OU, but not every logon. You would need to enable
auditing of logon events (and be prepared to analyize large audit files), or
use a logon script that logs the user and date/time.

An example VBScript logon script that writes user name, computer name, and
date/time to a shared log file:

http://www.rlmueller.net/Logon5.htm

I've used similar scripts several times in the past for many purposes
(tracking number of logons per day for each site, logons by hour of the day
or shift, number of users for each computer, etc). You can copy the log file
(so it is not held open) and open in a spreadsheet for analysis.

Two example VBScript programs that document the last logon dates for all
users in a domain:

http://www.rlmueller.net/Logon5.htm

You can modify the base of the ADO queries to be the DN of the OU rather
than of the domain. For example replace this statement in the program
LastLogon.vbs:

strBase = "<LDAP://" & arrstrDCs(k) & "/" & strDNSDomain & ">"

with a statement similar to:

strBase = "<LDAP://" & arrstrDCs(k) & "/ou=West,dc=MyDomain,dc=com>"

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Logon script PowerShell
Re: script to read disabled and enabled computer for 180 days inactive VB Script
Logon Script Causing Laptops To Hang - Problems in script? VB Script
Logon Script VB Script
Logon Script Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46