Summary: Use the Write-Eventlog Windows PowerShell cmdlet to write to a standard or to a custom event log.
How can you easily write output to an event log?
Use the Write-EventLog cmdlet, and make sure that you specify the log name and the source:
write-eventlog -logname Application -source MyApp -eventID 3001 -entrytype Information `
-message "MyApp added a user-requested feature to thedisplay." -category 1 -rawdata 10,20