Friday, January 20, 2006

Google Advanced stuff

also I should sign up on digg and have digg start tracking thing I like, why not better then book marking, relaying on history , etc.

Getting Security Logs From Windows 2003/2000 Servers

Need to get a script together to get security logs from multiple Windows 2000/2003 servers. Want the files compressed locally then xfered to centeral spot.

GetAllLogs.cmd - gets date and time into enviroment variable and launches getsrvlog.cmd.

for /f "Tokens=1-4 Delims=/ " %%i in ('date /t') do set dt=%%i_%%j_%%k_%%l
for /f "Tokens=1" %%i in ('time /t') do set tm=_%%i
set tm=%tm::=_%
set da=%dt%%tm%

echo %tm%
echo %da%

start cmd /c psexec \\server1 -c getsrvlog.cmd %da%
start cmd /c psexec \\server2 -c getsrvlog.cmd %da%
start cmd /c psexec \\server3 -c getsrvog.cmd %da%