Tag: event

Windows 7

Delete all event logs at once in Windows 7

@echo off FOR /F "tokens=1,2*" %%V IN (’bcdedit’) DO SET adminTest=%%V IF (%adminTest%)==(Access) goto noAdmin for /F "tokens=*" %%G in (’wevtutil.exe el’) DO (call :do_clear "%%G") echo. echo Event Logs have been cleared! ^<press any key^> goto theEnd :do_clear echo clearing %1 wevtutil.exe cl %1 goto :eof :noAdmin echo You must run this script as …

Microsoft Windows

Create event from command line in Windows

Using eventcreate command you can create a custom event and log it in any of the event log files(System, Application). Usage: eventcreate /id event_id /d event_description /t event_type /l event_log_fileeventcreate /id event_id /d event_description /t event_type /l event_log_file /s Computer : Specifies the name or IP address of a remote computer (do not use backslashes). …