Skip to content

Powershell version 7.4 does not support script block logging and no logs seen in eventviewer #21339

@defaultshr

Description

@defaultshr

Prerequisites

Steps to reproduce

Configure group policy for script block logging for powershell.

Expected behavior

logs in eventviewer under "Application and Services logs" -> "Microsoft" -> "Windows" -> "PowerShell" -> Operational

Actual behavior

No logs seen in the eventviewer for 7.4 powershell. However, we can see for older 5.x powershell.

Error details

No response

Environment data

PS C:\Program Files\PowerShell\7> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.4.1
PSEdition                      Core
GitCommitId                    7.4.1
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs-TriageThe issue is new and needs to be triaged by a work group.Resolution-DuplicateThe issue is a duplicate.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions