Search code examples
powershellwindows-10event-viewer

Windows - how can I create event log with "Comment" level?


How can I create a "comment" Level of a log manually ? in number the level is 5. Here an image:enter image description here

CommentLevel(5)


Solution

  • I did some testing myself and think I got what you are looking for.

    Write-EventLog -LogName Application -EntryType "Information" -EventId 666 -Message "Events are fun"  -Category 1  -Source "Application"
    

    enter image description here

    enter image description here Source: Write-Eventlog