Tuesday, October 18, 2011

Clearing All Logs

I've had the need to clear log files on multiple Windows Server 2008 R2 testing machines - more specifically virtual machines - and there was no easy way I could find to do this task. I wasn't going to open every log file in Event Viewer. I'd rather let a for loop do that for me, or a drinking bird.

Wrote a song about it. Like to hear it? Here it goes!

via Command-Line (Run as Administrator)

for /f %e IN ('wevtutil el') do wevtutil cl "%e"


or via batch file (.cmd or .bat)


@echo off
:: Clear all logs
::  10:55 AM 10/18/2011 Justin
::   http://justin-bennett-msjc.blogspot.com/
::
::
echo Clearing all log files
echo CRTL-C to abort within 10 secs.
echo .
ping 127.0.0.1 -n 11 > nul
color 07
@echo on
for /f %%e IN ('wevtutil el') do wevtutil cl "%%e"



Image From King-Size Homer - Simpsons Wiki, http://simpsons.wikia.com/wiki/King-Size_Homer

Saturday, October 1, 2011

Linking Mouse and Keyboard to Multiple Computers

Ever have to use a KVM to jump between systems? My buddy Anthony showed me years ago of a nice small software that links one set of keyboard and mice between multiple computers. It works to link Windows, Linux, and Mac OS keyboard and mouse control from one host system and control other client systems. I've used it to link Windows 7 to ArchLinux and Windows 7 to Windows 2008 R2. You then can have multiple monitors and OS running and not have to switch between multiple keyboards and mice to control the systems. I'd recommend using the Beta version as it's a bit easier to configure. It was a hoot to use the first time, so I thought I'd share.

http://synergy-foss.org/