Skip to content

Running script from WSL with noninteractive flag will show "SecurityError: AuthorizationManager check failed." #17623

@leoleoasd

Description

@leoleoasd

Prerequisites

Steps to reproduce

 /mnt/c/Program\ Files/PowerShell/7/pwsh.exe -noninteractive -executionpolicy unrestricted -file ./xxx.ps1

Expected behavior

runs successfully since there is a -executionpolicy unrestricted flag

Actual behavior

SecurityError: AuthorizationManager check failed.

Error details

I don't know how to provide this since I'm starting a .ps1 file and the session ends before the file's execution

Environment data

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

Visuals

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions