Advanced Windows PowerShell Scripting Video Training

Advanced Windows PowerShell Scripting Video Training
Advanced Windows PowerShell Scripting Video Training

Friday, August 7, 2009

How can I put events in the event log for testing?

Luckily there is a command lint tool that can be used to place custome events in both the Application and the System event logs. EventCreate will allow you to put test data into the logs.

Eventcreate /l application|system /t ERROR|WARNING|INFORMATION /id 1-1000 /d description
Here is an example

eventcreate / application /t information /id 51 /d "This is a test."

Give it a try.

No comments: