Forum Discussion

nahuu810's avatar
nahuu810
Copper Contributor
Oct 17, 2023

Powershell Events IDs

Is there a way to query all or most of the powershell and powershell operational event ids?

4 Replies

  • Jimcesseg's avatar
    Jimcesseg
    Copper Contributor

    nahuu810 

     

    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. 
     

    • nahuu810's avatar
      nahuu810
      Copper Contributor

      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

      • LainRobertson's avatar
        LainRobertson
        Silver Contributor

        nahuu810 

         

        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

Resources