Link to home
Create AccountLog in
Avatar of phileoca
phileocaFlag for United States of America

asked on

logging users info: Time Zoning it.

greetings,

I currently have in place a policy script that is logging user info upon log on and log off.
Is there a way to either:
a) append the time zone to the log file
b) log the time in GMT.

my current script looks like this:

@echo off
rem me 04/11/2006
:Logging
If Exist "\\ServerName\SYSVOL\Logs\LogOns.Log" GoTo START
Echo Log File > "\\ServerName\SYSVOL\Logs\LogOns.Log"
:START
Echo Log On,%USERNAME%,%COMPUTERNAME%,%Date:~0,12%,%Time:~0,5%>> "\\ServerName\SYSVOL\Logs\LogOns.Log"
rem Netstat  -an  |find  "3389"  |find  /I  "established"  >> "\\ServerName\SYSVOL\Logs\LogOns.Log"
Avatar of la_pepe59
la_pepe59

You could put a command in the batch file to query a registry key value such as..

reg query hklm\system\currentcontrolset\control\timezoneinformation /v standardname

then appened it to the log.  How many different time zones do you have that would be logged and is it in a domain?  
Nevermind about the above command line...that is for xp not 2000.  

How many different time zones do you have that would be logged and are you in a domain?
Avatar of phileoca

ASKER

1) yes it's a domain
2) all workstations are XP, but the domain policy in on a win2k server
3) time zones... 10+  that's why a GMT would be ideal
ASKER CERTIFIED SOLUTION
Avatar of la_pepe59
la_pepe59

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer