Feature Request: Make New-WinEvent pipeline friendly
See original GitHub issueSummary of the new feature/enhancement
Write-EventLog
does not currently accept pipeline input, although it might be useful in situations where you want to log multiple events log entries of the same type:
Get-SomeInformation |Write-EventLog -LogName Application -Source -EventID 100
Proposed technical implementation details (optional)
- Update the
Message
parameter attribute to setValueFromPipeline
- Override
ProcessRecord()
inWriteEventLogCommand
- Move
_myevent.WriteEntry()
call intoProcessRecord()
implementation
We might optionally want to consider an alternative InputObject
parameter in a separate set that passes non-string “messages” through OutStringCommand
before writing them to the event log
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:13 (2 by maintainers)
Top Results From Across the Web
Month of PowerShell - Working with the Event Log, Part 1
In practice, Get-WinEvent is the preferred way to access event log information, since it is designed to support the modern Windows Event Log ......
Read more >New-WinEvent - PowerShell
The New-WinEvent cmdlet creates an Event Tracing for Windows (ETW) event for an event provider. You can use this cmdlet to add events...
Read more >How to check Windows event logs with PowerShell
First, there are two ways to access the events logged in Windows – through the Event Viewer and using the Get-EventLog / Get-WinEvent...
Read more >How to Track Important Windows Security Events with ...
Learn how Windows security events are stored, how to manage audit policies and how to build a helpful PowerShell tool to track down...
Read more >How to use Get-EventLog, Convert-ToHTML and search ...
... This script produces the Windows Event Viewer in Out-GridView mode # This solution enables filtering with a user-friendly GUI interface, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Fair enough, let’s make
New-WinEvent
pipeline friendly then! 😅@iSazonov as long as it’s a documented API, it can be used. Whether it’s the right API to use, I’ll defer to code review.