Skip to content

How to create an Event using Powershell (over event id 1000)

April 12, 2011
If using EventCreate or other tools, you may face off the event id 1000 limit.
You may use the following powershell to create whatever event id you want (the only limit is the Windows default):
_
$evt=new-object System.Diagnostics.Eventlog(“Application”)
$evt.Source=”TestEventSource”
$evtNumber=6001
$evtDescription=”Test Event Description”
$infoevent=[System.Diagnostics.EventLogEntryType]::Warning
$evt.WriteEntry($evtDescription,$infoevent,$evtNumber)

From → Powershell, Scripting

Leave a Comment

Leave a comment