|
Here
it is .......
You
will also need a batch file named datetime.bat that I did not write. It is
below this batch place it in the same directory as the LOGON.CMD. I have
over 400 users in this domain that I run this on and the whole log file is less
than 130K for 1 month. Very simple and can pull into Excel for quick
checks. Hope this helps. - Joe S.
---------------------- Start Cut Here for LOGON.CMD
------------------------------------------
@echo
off
::call datetime.bat to set date variables
call %logonserver%\NETLOGON\Scripts\datetime ::is machine NT4 or W2K (I do this just to know) if exist "%SystemDrive%\Documents and Settings" goto W2K goto NT4 :W2K
Set VERSION=W2K
goto CONTINUE :NT4
Set VERSION=NT4 goto CONTINUE :CONTINUE
:: EX:
DateLogon,timelogon,MachineName,Username,Logonserver,OS
:: Output: 04/05/2002,4:32p,JDOE_W2K,JMDoe,\\Server,NT4 :: write the following line in comma delimted format echo %vdate%,%vtime%,%COMPUTERNAME%,%USERNAME%,%LOGONSERVER%,%VERSION%>>\\server\logonuser\login.txt goto End :End
------------------------ End Cut Here for LOGON.CMD
---------------------------------------
---------------------- Start cut here for DATETIME.BAT
--------------------------------------
::
__________________________________________________________________
:: :: Batch File: DATETIME.BAT :: Author: Frank-Peter Schultze :: :: Updates: http://www.fpschultze.de/b6.htm :: Enhancement Req. :: And Bug Reports: [EMAIL PROTECTED] :: :: Built/Tested On: MS-DOS 6.22, Windows 98 SE, Windows NT 4.0 :: Requirements: OS: MS-DOS 5+, Windows NT4+ :: :: Purpose: Set DATE/TIME Variable To The System Date/Time. :: :: Syntax: No arguments required. :: :: State Changes: Reduces free environment space. :: :: Assumptions And :: Limitations: * Does not handle low environment errors. :: :: Last Update: 2001-12-01 :: __________________________________________________________________ :: @Echo Off If Not %1'==/?' Goto Begin Echo Sets DATE and TIME variable to the system date and time. Echo. Echo [Call] DATETIME Goto End :Begin For %%V In (vDATE vTIME) Do Set %%V= If %OS%'==Windows_NT' Goto %OS% Echo Exit | %COMSPEC% /K Prompt If %%%%3'==' %%%%0 $D $T$_Set vDATE=%%%%2$_Set vTIME=%%%%3$_:>%TEMP%.\$ATETIME.BAT For %%C In (Call Del) Do %%C %TEMP%.\$ATETIME.BAT Goto End :Windows_NT For /F "Tokens=2" %%D In ('Date /T') Do (Set vDATE=%%D) For /F %%T In ('Time /T') Do (Set vTIME=%%T) :End ---------------------- End cut here for DATETIME.BAT
--------------------------------------
|
Title: Message
- [ActiveDir] tracking users logon to AD Henrique Duarte
- RE: [ActiveDir] tracking users logon to AD Joe Sargent
- Re: [ActiveDir] tracking users logon to AD Henrique Duarte
- RE: [ActiveDir] tracking users logon to AD Sargent Joey E
- RE: [ActiveDir] tracking users logon to AD Joe Sargent
- Re: [ActiveDir] tracking users logon to A... Henrique Duarte
- RE: [ActiveDir] tracking users logon... Sargent Joey E
- [ActiveDir] kicking off innactive users w... Henrique Duarte
- RE: [ActiveDir] tracking users logon to AD OFFORD, Vivian
- RE: [ActiveDir] tracking users logon to AD Ayers, Diane
