Skip to content

Eventing Support for PowerShell (PSEvents.dll) #1189

Description

Overview

It is desirable to have each instance of PowerShell log ETW events to its own instance-specific event log rather than re-using the existing inbox PowerShell event log. To do this, each instance of PowerShell must register its event manifest with ETW and carry its own copy of PSEvents.dll (assuming it differs from the inbox version of the file).

Changes Required

  1. Port PSEvents.dll to GitHub. The big step here is to create PSEvents.dll from the manifest
  2. Generate a unique GUID and name for the event provider during each major or minor release. These values must be saved in Microsoft-Windows-PowerShell-Instrumentation.man.
  3. Create a post-install script or cmdlet to register the event provider with ETW using wevtutil.exe

Open Issues:

  1. wevtutil.exe should be supported on all Windows OSs, but it might now work on Nano Server. How do we support event registration in that case?
  2. More investigation is required to determine the process for generating PSEvents.dll in GitHub. SD produces it automatically for us based on a macro.
  3. A non-Windows eventing or logging solution should be researched as well.

Activity

  1. changed the title [-]Eventing Support for Open PowerShell[/-] [+]Eventing Support for Open PowerShell (PSEvents.dll)[/+] on Jul 2, 2016
  2. changed the title [-]Eventing Support for Open PowerShell (PSEvents.dll)[/-] [+]Eventing Support for PowerShell (PSEvents.dll)[/+] on Aug 17, 2016
  3. removed this from the post-6.0.0 milestone on Mar 4, 2017
  4. dantraMSFT commented on Oct 19, 2017

    @dantraMSFT
    Contributor

    Mike Richmond (@mirichmo) I don't think it's viable to change the provider guid every minor and/or major release. Monitoring teams will be reluctant to have to keep rev'ing.
    As far as PSEvents generation; we did this DSC; I'll dig out the necessary build pieces.

  5. iSazonov commented on Jul 11, 2019

    @iSazonov
    Collaborator

    Steve Lee (@SteveL-MSFT) It seems we could close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-SideBySiderelated to ability to run PS7 side-by-side with WinPS or different versions of PS7Issue-Enhancementthe issue is more of a feature request than a bugResolution-AnsweredThe question is answered.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions