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 Watcher Script Failed to Start "Write-EventLog -LogName Application -Source" Powershell Scripts "-EntryType Warning -EventID 1021 -Message" File Watcher Script Could Not Be Unloaded "Write- EventLog -LogName Application -Source "Powershell Scripts" -EntryType Information -EventID 1022 -Message "File Watcher Script Started" Write-EventLog -LogName Application -Source "Powershell Scripts" -EntryType Information -EventID 1023 -Message "File Monitor Script ended "# Read EventLog Get-EventLog -LogName Application -Newest 10 | Select-Object -Property Index, TimeGenerated, TimeWritten, EventType, Source, CategoryNumber, Message Get-Eventlog -LogName Application -Entrytype Information -Next 09 / 12 / 2017 -Newest 5 | Where-Object Message -Like "File Monitor *" | Format-Table TimeGenerated, Message -wrap Get-WinEvent -FilterHashtable @ {LogName = "Application"; ID = 1020} # Clear Source: Remove-EventLog -Source "Powershell-Scripts"

Create your own event log

Create Windows Event Logs via Batch and Powershell