EVENTCREATE – Windows CMD Command
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
Examples:
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 F4TApp:
C:\> EVENTCREATE /T WARNING /ID 500 /L APPLICATION /SO F4TApp /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"
Hi there! This post could not be written any better! Reading through this post reminds me of my good old room mate! He always kept talking about this. I will forward this page to him. Fairly certain he will have a good read. Many thanks for sharing!