Eventcreate Command In Windows Server 2008
This article describes Eventcreate command in windows server 2008 operating system and also explains its syntax.
Introduction
Eventcreate is command line tool that is built in Windows serer 2008. this command line tool also available in Windows 7, Windows Vista and Windows XP. The eventcreate command is used to create custom event Id and message in a specified event log, requires administrative rights so it enables an administrator. Basic syntax for using eventcreate command is given below.
Syntax
eventcreate [/s <Computer> [/u <Domain\User> [/p <Password>]] {[/l {APPLICATION|SYSTEM}]|[/so <SrcName>]} /t {ERROR|WARNING|INFORMATION|SUCCESSAUDIT|FAILUREAUDIT} /id <EventID> /d <Description> |
Parameters of eventcreate command
Parameter |
Description |
/s <Computer> |
Name or IP address of a remote computer to connect to. |
/u <Domain\User> |
User credentials under which command should execute. |
/p <Password> |
Specifies the password for the user account .Prompts for input, if omitted. |
/l { Application/System} |
Name of the event log where the event will created. |
/so <SrcName> |
Specifies the source to use for the event. A text string that represents the application is valid source or component that is generating the event. |
/t {ERROR|WARNING|INFORMATION|
SUCCESSAUDIT|fAILUREAUDIT} |
Type of event to create. Valid types are ERROR, WARNING, INFORMATION, SUCCESSAUDIT and FAILUREAUDIT. |
/id <EventId> |
Specifies the event ID for the event, a number between 1-1000. |
/d <Description> |
Description text for the newly created event. |
Following example shows , how to use eventcreate command
EVENTCREATE /t error /id 1000 /l application /d "My custom error event for the application log"
EVENTCREATE /t error /id 999 /l application /so WinWord event 999 happened due to low diskspace"
EVENTCREATE /s server /t error /id 100 /l application /d "Remote machine without user credentials"
EVENTCREATE /s server /u user /p password /id 100 /t error /l application /d "Remote machine with user credentials" |
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here