Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executionpolicy set in GPO is ignored in Powershell 7.2.11 #19589

Closed
5 tasks done
krylosz opened this issue Apr 28, 2023 · 6 comments
Closed
5 tasks done

Executionpolicy set in GPO is ignored in Powershell 7.2.11 #19589

krylosz opened this issue Apr 28, 2023 · 6 comments
Assignees
Labels
Issue-Question ideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a Resolution-No Activity Issue has had no activity for 6 months or more WG-Security security related areas such as JEA

Comments

@krylosz
Copy link

krylosz commented Apr 28, 2023

Prerequisites

Steps to reproduce

Powershell 7 ignores Executionpolicy settings made in GPO. Machinepolicy remains undefined even though it is set via GPO and displayed and used correctly in Powershell 5 on the same machine.
Powershell-Executionpolicy

Expected behavior

PS C:\> Get-ExecutionPolicy -List

        Scope ExecutionPolicy
        ----- ---------------
MachinePolicy    Unrestricted

Actual behavior

PS C:\> Get-ExecutionPolicy -List

        Scope ExecutionPolicy
        ----- ---------------
MachinePolicy       Undefined

Error details

No response

Environment data

PS C:\> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.2.11
PSEdition                      Core
GitCommitId                    7.2.11
OS                             Microsoft Windows 10.0.20348
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

@krylosz krylosz added the Needs-Triage The issue is new and needs to be triaged by a work group. label Apr 28, 2023
@StevenBucher98 StevenBucher98 added WG-Security security related areas such as JEA Issue-Bug Issue has been identified as a bug in the product labels May 15, 2023
@StevenBucher98
Copy link
Collaborator

Somewhat related to this discussion: PowerShell/PowerShell-RFC#334

@TravisEz13 or @PaulHigin is this expected behavior? I am not familiar with GPO

@PaulHigin
Copy link
Contributor

@TravisEz13 can you please take a look?

@TravisEz13
Copy link
Member

TravisEz13 commented May 22, 2023

Please install the PowerShell 7 GPO and set that and see if you still have this issue:
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_group_policy_settings?view=powershell-7.3

Describes the Group Policy settings for PowerShell

@TravisEz13 TravisEz13 added Issue-Question ideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a and removed Issue-Bug Issue has been identified as a bug in the product Needs-Triage The issue is new and needs to be triaged by a work group. labels May 22, 2023
Copy link
Contributor

This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Resolution-No Activity Issue has had no activity for 6 months or more label Nov 19, 2023
Copy link
Contributor

This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes.

1 similar comment
Copy link
Contributor

This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Question ideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a Resolution-No Activity Issue has had no activity for 6 months or more WG-Security security related areas such as JEA
Projects
None yet
Development

No branches or pull requests

4 participants