EVENTCREATE (Windows 2003/2008)

Add a message to the Windows event log, requires administrator rights.

Syntax EVENTCREATE [/S system [/U username [/P [password]]]] /ID eventid [/L logname] [/SO srcname] /T type /D description Key: /S system The remote system to connect to. /U [domain\]user User credentials under which to execute. /P [password] Password for user, will prompt if omitted. /L logname The event log to create an event in. /T type The type of event to create: SUCCESS, ERROR, WARNING, INFORMATION. /SO source The source to use for the event A text string that represents the application or component that is generating the event. Default='eventcreate' /ID id Event ID, a number between 1 - 1000. /D description Description text for the new event. /? Help


Add an ERROR to the Application log:

C:\> EVENTCREATE /T ERROR /ID 1000 /L APPLICATION /D "My application error mesaage"

Add a WARNING to the Application log for Application SS64App:

C:\> EVENTCREATE /T WARNING /ID 500 /L APPLICATION /SO SS64App /D "Running low on diskspace"

Add an ERROR to the Application log on Server401:

C:\> EVENTCREATE /S Server401 /T ERROR /ID 250 /L APPLICATION /D "Something bad happened"

Add an ERROR to the Application log on Server401:

C:\> EVENTCREATE /S Server401 /U billg /P password /ID 250 /T ERROR /L APPLICATION /D "Something bad happened"

“Ideology: a system of organizing principals, a way of seeing the world as the basis of a social or political philosophy or program”


EVENTQUERY - Read an event log message

EVENTTRIGGERS - Display and configure Event Triggers

LOGEVENT Write text to the NT event viewer

Powershell: Get-Eventlog - Get / write eventlog data

WshShell.LogEvent - Log an item in the Event log

WMIC NTEVENTLOG - WMI access to the event log

Q131008 - Use eventlog from a batch file