Create your own Windows event log

In this guide, I briefly describe how you can create your own event log.

An illustration of the event viewer:

# The Windows Pope # Create new source: New-EventLog -LogName Application -Source "Powershell-Scripts" # Write EventLog Write-EventLog -LogName Application -Source "Powershell-Scripts "-EntryType Error –EventID 1020 -Message" File monitoring script could not be started "Write-EventLog -LogName Application -Source" Powershell scripts "-EntryType Warning –EventID 1021 -Message" File monitoring script could not be unloaded "Write- EventLog -LogName Application -Source "Powershell Scripts" -EntryType Information -EventID 1022 -Message "File monitoring script has started" Write-EventLog -LogName Application -Source "Powershell Scripts" -EntryType Information -EventID 1023 -Message "File monitoring Script was terminated "# Read EventLog Get-EventLog -LogName Application -Newest 10 | Select-Object -Property Index, TimeGenerated, TimeWritten, EventType, Source, CategoryNumber, Message Get-Eventlog -LogName Application -Entrytype Information -After 09/12/2017 -Newest 5 | Where-Object Message -Like "File Monitoring *" | Format-Table TimeGenerated, Message -wrap Get-WinEvent -FilterHashtable @ {LogName = "Application"; ID = 1020} # Delete source again: Remove-EventLog -Source "Powershell scripts"

Create your own event log

Create Windows Event Logs via Batch and Powershell