Forum Discussion
Powershell Events IDs
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.
hi! Jimcesseg thanks for your answer! This command only shows the event ids of the logs that the PC has recorded. I want to know all the event ids that exist for powershell and powershell-operational regardless of whether or not they were found on my pc
- LainRobertsonOct 18, 2023Silver 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