- Notifications
You must be signed in to change notification settings - Fork8.1k
Remove the use of Windows PowerShell ETW provider id and updatePSDiagnostics module to work for PowerShell 7#25590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…gnostics to work for PS7+
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I'm not really too familiar with the ETW side and thePSDiagnostics module but wouldn't this be a breaking change? Right now thePSDiagnostics module is importable in PS 7 and manages the WinPS provider. While I understand trying to keep the providers aligned with the PowerShell version used there could potentially be people using PS 7 to manage the WinPS provider in this module.
| /// </summary> | ||
| publicconstlongKeywordAll=0xFFFFFFFF; | ||
| privatestaticreadonlyGuidproviderId=Guid.Parse("a0c1853b-5c40-4b15-8766-3cf1c58f985a"); |
jborean93May 22, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Is there a reason why this doesn't use thePowerShellCore Provider IDf90714a8-5509-434a-bf6d-b1624c8a19a2 rather than just removing it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
It is already there. It is inherited from EwtActivity.ProviderId (that is PSEtwLogProvider.ProviderGuid).
The (whole) code looks a bit confusing, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This looks like an oversight when introducing thePowerShellCore provider initially in#5144.
TheTracer class is used in*-PSSessionConfiguration commands to write ETW logs likeEndpoint registered/unregistered/modified/enabled/disabled. Today, those events are writting to the Windows PowerShell provider. The class is only used inContainerParentJob.
The change to This module is shipped with PowerShell 7, so intuitively, running |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM!
Uh oh!
There was an error while loading.Please reload this page.
/azp run PowerShell-CI-linux-packaging, PowerShell-Windows-Packaging-CI |
| Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
b852378 intoPowerShell:masterUh oh!
There was an error while loading.Please reload this page.
microsoft-github-policy-servicebot commentedOct 1, 2025 • edited by unfurl-linksbot
Loading Uh oh!
There was an error while loading.Please reload this page.
edited by unfurl-linksbot
Uh oh!
There was an error while loading.Please reload this page.
📣 Hey @@daxian-dbw, how did we do? We would love to hear your feedback with the link below! 🗣️ 🔗https://aka.ms/PSRepoFeedback |
Uh oh!
There was an error while loading.Please reload this page.
PR Summary
This PR includes 2 changes to clean up the ETW logging related code in PowerShell:
a0c1853b-5c40-4b15-8766-3cf1c58f985a) in current code base. This seems to be an oversight from the initial effort to create manifest based ETW provider for PowerShell 7+ (Redirect ETW logging to Syslog on Linux #5144).PSDiagnosticsmodule to make it work against PowerShell 7 -- enable/disable thePowerShellCoreETW provider instead ofMicrosoft-Windows-PowerShell, which is the ETW provider for Windows PowerShell.PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerPSDiagnosticsmodule in PowerShell 7 will be updated to work with the "PowerShellCore" ETW provider MicrosoftDocs/PowerShell-Docs#12091