How to create Windows EventLog source from command line?

Try “eventcreate.exe”

An example:

eventcreate /ID 1 /L APPLICATION /T INFORMATION  /SO MYEVENTSOURCE /D "My first log"

This will create a new event source named MYEVENTSOURCE under APPLICATION event log as INFORMATION event type.

I think this utility is included only from XP onwards.

Further reading

  • Windows IT Pro: JSI Tip 5487. Windows XP includes the EventCreate utility for creating custom events.

  • Type eventcreate /? in CMD prompt

  • Microsoft TechNet: Windows Command-Line Reference: Eventcreate

  • SS64: Windows Command-Line Reference: Eventcreate

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)