Forrest logo
back to the eventcreate tool

eventcreate:tldr:20b5b

eventcreate: Create an event in a specific event log.
$ eventcreate /l ${log_name} /t ${type} /id ${id} /d "${message}"
try on your machine

This command is used to create a custom event log entry in Windows using the Event Viewer. Here's the breakdown of the command:

  • eventcreate: This is the command-line tool used to create a new event.
  • /l ${log_name}: Specifies the name of the event log where the event will be created. ${log_name} is a variable that should be replaced with the actual name of the event log.
  • /t ${type}: Specifies the type of the event. ${type} is a variable that should be replaced with one of the following values: ERROR, WARNING, INFORMATION.
  • /id ${id}: Specifies the event identifier. ${id} is a variable that should be replaced with a numerical value.
  • /d "${message}": Specifies the description or message of the event. ${message} is a variable that should be replaced with the actual message content. The message should be enclosed in double quotes.

For example, if you want to create a new error event in the Application event log with the event ID 1000 and the message "An error occurred", you would use the command like this:

eventcreate /l Application /t ERROR /id 1000 /d "An error occurred"
This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the eventcreate tool