Skip to content

Logging of script block execution cannot be enabled on Unix #5695

Description

PowerShell checks whether to log script block activities in ShouldLogScriptBlockActivity, which query Registry on windows to get the configuration via GetGroupPolicySetting. However, GetGroupPolicySetting does nothing on Unix, and thus script block activity logging cannot be enabled on Unix.

A potential fix is to make PowerShell checks against an entry in pwsh.runtimeconfig.json.

Activity

  1. dantraMSFT commented on Jan 31, 2018

    @dantraMSFT
    Contributor

    Reopened since the change causes all analytic events to be logged unconditionally on Linux.

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

Metadata

Metadata

Labels

Resolution-FixedThe issue is fixed.WG-Enginecore PowerShell engine, interpreter, and runtime

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions