November 15, 2024
powershell

Create New Eventlog via Powershell on Windows

You can create new eventlog via powershell on windows server or client. It doesnt matter client or server, method is same.

Some cases we need writing event log on the machie for application purpose or control something. In this short article i will demonstrate you how can you create New eventlog via Powershell.

Create New Eventlog via Powershell on Windows

Just before the creating eventlog, I want to show you there is no source which i havent been created on my eventlog viewer as name Test-Event.

I have two variables on below which describe Log source and Log message

$Logsource = will create new source on event viewer as Event sources

$Logmessage = The event log message i will create in the new eventlog

I have runned below powershell command.

There is no error on result

You can see the eventlog source and event log message has been created on windows server.

One thought on “Create New Eventlog via Powershell on Windows

  1. Powershell ile Event Log Yazdırma

    […] aslında daha önce değinmiştim. Not alma açısından ingilizce olarak paylaştığım linke buradan […]

Bir yanıt yazın