Create Event

Create an event for the given event log on a local or remote computer.


Elevated - Run as administrator.

Input Parameters

Name Type Required Description
Computer String Yes The name of the computer on which to create the event. Can be the NetBIOS name, an Internet Protocol (IP) address, or a fully qualified domain name of a remote computer.
Log Name String Yes The name of the log, the value of the Log property. Wild cards are not permitted.
Source String Yes Specifies the names of the event log sources, such as application programs that write to the event log. This parameter is required.
Entry Type String No Default value is 'Information'.
Message String Yes The message for the event.
Event ID Number Yes The event identifier.
Category String Yes Specifies a task category for the event. Enter an integer that is associated with the strings in the category message file for the event log.
Data String No The binary data that is associated with the event, in bytes.

Output Parameters

Name Type Description
Result Number Returns a success value of zero or any value other than zero to indicate failure.

Example Input Parameters

Name Type Required Example
Log Name String Yes Application
Source String Yes MSP Name
Message String Yes User has declined Maintenance
Type Selector Yes Warning
Event ID Number Yes 1234
Category String Yes 1