question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: Make New-WinEvent pipeline friendly

See original GitHub issue

Summary 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)

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:open
  • Created 4 years ago
  • Reactions:3
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
IISResetMecommented, Jul 27, 2019

Fair enough, let’s make New-WinEvent pipeline friendly then! 😅 image

1reaction
SteveL-MSFTcommented, Nov 11, 2019

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found