Forum Discussion
Powershell Events IDs
Is there a way to query all or most of the powershell and powershell operational event ids?
4 Replies
nahuu810 I wrote a blog about that recently, https://powershellisfun.com/2023/08/23/retrieve-local-and-remote-powershell-logs/ , perhaps that will help you?
Please click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.
If the post was helpful in other ways, please consider giving it a Like.- JimcessegCopper Contributor
You can try it with this:
Get-EventLog -LogName "Windows PowerShell"https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_eventlogs?view=powershell-5.1
Please let us know if that works for you.
- LainRobertsonSilver Contributor
As far as I'm aware, this isn't possible as there's no interface for pulling all event definitions out from a provider.
Additionally, not all providers work from a predefined list of events. I've seen many that purely function as loggers of results for which the numeric event ids are useless.
The only thing you can do is see if Microsoft has documented a list of events, but I have never seen a way to pull such metadata programmatically.
Cheers,
Lain