How to create Windows EventLog source from command line?

e.g. 1: eventcreate /ID 1 /L APPLICATION /T INFORMATION  /SO OlympicApp /D "Olympic2012 Log"

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


e.g. 2: eventcreate /ID 2 /L APPLICATION /T ERROR  /SO OlympicApp /D "Olympic2012 Log"

This will create a new event source named "OlympicApp" under APPLICATION event log as ERROR event type.


e.g. 3: eventcreate /ID 3 /L APPLICATION /T WARNING  /SO OlympicApp /D "Olympic2012 Log"

This will create a new event source named "OlympicApp" under APPLICATION event log as WARNING event type.

原文地址:https://www.cnblogs.com/zhaobin/p/2939143.html