JSI Tip 7295. The Windows XP and Windows Server 2003 EventCreate utility

Jerold Schulman

October 7, 2003

2 Min Read
ITPro Today logo in a gray background | ITPro Today

When you use the Windows XP CMD help., or Windows Server 2003 CMD help, and press Eventcreate on the New command-line tools page, you see:

Eventcreate

Enables an administrator to create a custom event in a specified event log.

Syntax

eventcreate [/s Computer[/u DomainUser [/p Password]]{[/l {Log Name}] | [/so SrcName]}/t {ERROR | WARNING | INFORMATION}/id EventID/d Description

Parameters

/s ComputerSpecifies the name or IP address of a remote computer (do not use backslashes). The default is the local computer./u DomainUserRuns the command with the account permissions of the user specified by User or DomainUser. The default is the permissions of the current logged on user on the computer issuing the command./p PasswordSpecifies the password of the user account that is specified in the /u parameter./l {Log Name}Specifies the name of the event log where the event will be created. The valid log names are APPLICATION and SYSTEM./so SrcNameSpecifies the source to use for the event. A valid source can be any string and should represent the application or component that is generating the event./t {ERROR | WARNING | INFORMATION}Specifies the type of event to create. The valid types are ERROR, WARNING, and INFORMATION./id EventIDSpecifies the event ID for the event. A valid ID is any number from 1 to 1000./d DescriptionSpecifies the description to use for the newly created event./?Displays help at the command prompt.

Remarks

  • Custom events cannot be written to the security log.

  • By default, eventcreate registers itself as the default event source for the Application log. Eventcreate can only be registered for one log at a time. If the default source is set to the Application log, any event created in the System log must have some /so source value listed explicitly.

Examples

The following examples show how you can use the eventcreate command:

eventcreate /t error /id 100 /l application /d "Create event in application log"
eventcreate /t information /id 1000 /so winmgmt /d "Create event in WinMgmt source"
eventcreate /t error /id 1000 /so winword /l application /d "new src Winword in application log"
eventcreate /s server /t error /id 100 /l application /d "Remote computer without user credentials"
eventcreate /s server /u user /p password /id 100 /t error /l application /d "Remote computer with user credentials"
eventcreate /s server1 /s server2 /u user /p password /id 100 /t error /so winmgmt /d "Creating events on Multiple remote computers"
eventcreate /s server /u domainuser /p password /t warning /l SYSTEM /so winmgmt /id 100 /d "Creating events on Multiple remote machines"



Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like