Set-GPPermission -Confirm:$false not working

Defualt_User 1 Reputation point
2022-04-02T16:22:22.127+00:00

I have written a script to silently execute. There is one particular line code that cannot run silently and is causing unnecessary productivity issues. The code is below;

Set-GPPermissions -Name Marketing -PermissionLevel None -TargetName "Authenticated Users" -TargetType Group -WarningAction SilentlyContinue -Confirm:$false

Apparently someone can explain how to make this code run silently without user prompt will be a nice.

Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,600 questions
Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,069 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,456 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 45,831 Reputation points
    2022-04-02T19:02:05.687+00:00

    If it's the same problem that's been around for several years, search the web for "Set-GPPermissions confirm switch" and see if the problem is the security group and your computer's membership. There was a change made by a patch to the permission requirements.

    0 comments No comments