The eventcreate command is what you will use to do this. You can pull up a list of switches in eventcreate by using the /? switch.
Switch | Action |
---|---|
/S | Specifies the remote system you will be creating the event on |
/U | The username that will be used to execute the command |
/P | The password for the username. You will be asked for a password if you do not supply one |
/L | The event log you want to write to (i.e. System, Security, Application, etc.) |
/T | Specify the level of criticality of the error, Success, Error, Warning, Information |
/SO | You can specify the source of the event if needed |
/ID | You can specify the event ID for this event (between 1 and 1000) |
/D | This is the description of the event in quotes, "This is a test event" |
The example I will be using in my next segment is:
eventcreate /l application /t information /id 1000 /so SCOMTest /d "This is a test event"
This will create an event with the ID of 1000 and a source of SCOMTest in the Application log.
More to come!
Like this blog, give it a g+1
No comments:
Post a Comment