Set-GPPermissions -Guid <Guid> -TargetName "Authenticated Users" -PermissionLevel None -TargetType Group -Replace -Confirm:$false
Used to work fine, but when KB3163622 patch was installed it now asks me confirmation prompt:
"Group Policy requires each computer account to have permission to read GPO data from a domain controller in order for User Group Policy settings to be successfully applied. Removing the Authenticated Users group may prevent processing of User Group Policies. For more information, please see https://support.microsoft.com/en-us/kb/3163622 Do you want to continue ?"
I execute this command from Powershell and C#.
There is any way to skip this confirmation prompt?
Instead of Set-GPPermission, you can use the built-in tool dsacls, that does not prompt for confirmation:
dsacls "cn={$($gpo.id)},cn=policies,$((Get-ADDomain).SystemsContainer)" /R "Authenticated Users"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With