Write-EventLog return Object

The CMDlet is not returning anything for me. Anyone else see this on their end?

(Write-EventLog -LogName "dummy log" -Source "dummy source" -EventId 75 -Message "dummy msg").getType();

Yes the log and source are valid, but I would be expecting a return object of the event I just created.

Powershell 5.1 says it returns an object

https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/write-eventlog?view=powershell-5.1

Am I crazy?

submitted by /u/chazlander
[link] [comments]

Leave a Reply