Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
daxian-dbw merged 3 commits intoPowerShell:masterfromdaxian-dbw:provider-id
Oct 1, 2025

Conversation

@daxian-dbw
Copy link
Member

@daxian-dbwdaxian-dbw commentedMay 21, 2025
edited
Loading

PR Summary

This PR includes 2 changes to clean up the ETW logging related code in PowerShell:

  1. Remove the use of Windows PowerShell ETW provider id (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).
  2. Minor updates to thePSDiagnostics module to make it work against PowerShell 7 -- enable/disable thePowerShellCore ETW provider instead ofMicrosoft-Windows-PowerShell, which is the ETW provider for Windows PowerShell.

PR Checklist

@daxian-dbwdaxian-dbw added the CL-CodeCleanupIndicates that a PR should be marked as a Code Cleanup change in the Change Log labelMay 21, 2025
Copy link
Collaborator

@jborean93jborean93 left a 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");
Copy link
Collaborator

@jborean93jborean93May 22, 2025
edited
Loading

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?

Copy link
Collaborator

@iSazonoviSazonovMay 22, 2025
edited
Loading

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.

Copy link
MemberAuthor

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.

@daxian-dbwdaxian-dbw added the CL-BreakingChangeIndicates that a PR should be marked as a breaking change in the Change Log labelMay 22, 2025
@daxian-dbw
Copy link
MemberAuthor

I'm not really too familiar with the ETW side and the PSDiagnostics module but wouldn't this be a breaking change? Right now the PSDiagnostics 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.

The change toPSDiagnostics is a breaking change. It breaks the scenario where a user intentionally uses PowerShell 7+ to enable/disable Windows PowerShell ETW tracing. But is that a real-world scenario?

This module is shipped with PowerShell 7, so intuitively, runningEnable-PSTrace from this module should enable thePowerShellCore provider instead of the Windows PowerShell ETW provider.

@microsoft-github-policy-servicemicrosoft-github-policy-servicebot added the Review - NeededThe PR is being reviewed labelMay 30, 2025
@daxian-dbwdaxian-dbw added WG-Cmdletsgeneral cmdlet issues WG-NeedsReviewNeeds a review by the labeled Working Group labelsSep 22, 2025
Copy link
Collaborator

@SeeminglyScienceSeeminglyScience left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM!

@daxian-dbw
Copy link
MemberAuthor

/azp run PowerShell-CI-linux-packaging, PowerShell-Windows-Packaging-CI

@azure-pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@daxian-dbwdaxian-dbw merged commitb852378 intoPowerShell:masterOct 1, 2025
36 checks passed
@daxian-dbwdaxian-dbw deleted the provider-id branchOctober 1, 2025 19:38
@daxian-dbwdaxian-dbw removed the Review - NeededThe PR is being reviewed labelOct 1, 2025
@microsoft-github-policy-service
Copy link
Contributor

microsoft-github-policy-servicebot commentedOct 1, 2025
edited by unfurl-linksbot
Loading

📣 Hey @@daxian-dbw, how did we do? We would love to hear your feedback with the link below! 🗣️

🔗https://aka.ms/PSRepoFeedback

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

Reviewers

@iSazonoviSazonoviSazonov left review comments

@TravisEz13TravisEz13TravisEz13 approved these changes

@SeeminglyScienceSeeminglyScienceSeeminglyScience approved these changes

@adityapatwardhanadityapatwardhanAwaiting requested review from adityapatwardhan

+1 more reviewer

@jborean93jborean93jborean93 left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

CL-BreakingChangeIndicates that a PR should be marked as a breaking change in the Change LogCL-CodeCleanupIndicates that a PR should be marked as a Code Cleanup change in the Change LogWG-Cmdletsgeneral cmdlet issuesWG-NeedsReviewNeeds a review by the labeled Working Group

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@daxian-dbw@jborean93@TravisEz13@iSazonov@SeeminglyScience

[8]ページ先頭

©2009-2025 Movatter.jp