I\'m creating an ASP.NET application that will log some stuff to Windows EventLog. To do this an event source has to be created first. This requires administrative priviledg
Throwing this in for PowerShell 2.0 and upwards:
Run New-EventLog once to register the event source:
New-EventLog -LogName Application -Source MyApp
Then use Write-EventLog to write to the log:
Write-EventLog
-LogName Application
-Source MyApp
-EntryType Error
-Message "Immunity to iocaine powder not detected, dying now"
-EventId 1
Or just use the command line command:
Eventcreate