Good morning AskPerf! Blake here to discuss an internal command line tool called Eventcreate. What exactly is Eventcreate? I’m glad you asked. In a nutshell, Eventcreate is a command line tool that enables an administrator to create a custom event ID and message in a specified event log. Let’s check out its options and some examples. When you type “Eventcreate /?” from a command prompt, the following appears:
Let’s now take a look at some Eventcreate examples:
Create a simple Information event is the System log with an ID of 76:
Create an Error event in the Application log on a remote system with an ID 123:
Create a Warning event in the Security log with an id of 100:
Did you catch the error above? Windows does not allow you to create custom events in the Security log. This is reserved for System level processes.
So you might be asking yourself, how can this be useful to me? Well, if you write a lot of automated scripts and wonder if they complete successfully or error out, then this is your tool. Simply modify your script with an Eventcreate command, and you’ll never ask again what happened while your script was running.