Life is a journey

Who Dares Wins
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

How to create Windows EventLog source from command line?

Posted on 2013-03-01 17:35  zhaobin  阅读(238)  评论(0编辑  收藏  举报

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.