GPO 申请失败;原因:无法访问、为空或已禁用;Server 2012 R2 和 Windows 10

Dan*_*iel 16 active-directory group-policy windows-server-2012-r2 windows-10

我有一个 Windows Server 2012 R2 域。

昨天,一台计算机(运行 Windows 10 专业版)的网络驱动器停止工作。

经过进一步调查 ( gpresult /h),似乎所有组策略对象都因原因而失败Inaccessible, Empty, or Disabled

我已经确认所有 GPO 仍然存在并且在(冗余和本地)域控制器上都启用。此外,在同一个域和 LAN 上还有 20 台其他机器,绝对没有问题。

但是,我测试过的另一台计算机也出现了同样的问题!这是否意味着问题出在服务器上?

gpresult /r报告一个客户端从本地 DC1 获取 GPO,另一个从 DC2 获取。所以这不是与特定 DC 相关的问题。

gpupdate /force 没有修复任何东西(尽管它声称已应用政策)。

我尝试删除本地策略的注册表项(按照本指南https://superuser.com/questions/379908/how-to-clear-or-remove-domain-applied-group-policy-settings-after-leaving-the -do ) 并重新启动 - 同样的问题。

我从 Microsoft ( https://support.microsoft.com/en-us/kb/2976965 )找到了这个支持页面,但它声称它仅适用于 Windows 7 或更早版本的客户端。

我所有的机器(服务器和客户端)都运行 64 位版本并且已经完全更新。为了确定起见,我已经重新启动了所有这些。

yag*_*555 19

检查补丁joeqwerty链接太多

有一个重要的细节:

已知的问题

MS16-072 更改用于检索用户组策略的安全上下文。这种设计行为更改可保护客户的计算机免受安全漏洞的影响。在安装 MS16-072 之前,使用用户的安全上下文检索用户组策略。安装 MS16-072 后,使用计算机安全上下文检索用户组策略。此问题适用于以下知识库文章:

  • 3159398 MS16-072:组策略安全更新说明:2016 年 6 月 14 日
  • 3163017 Windows 10 累积更新:2016 年 6 月 14 日
  • 3163018 Windows 10 Version 1511 和 Windows Server 2016 Technical Preview 4 累积更新:2016 年 6 月 14 日
  • 3163016 Windows Server 2016 Technical Preview 5 累积更新:2016 年 6 月 14 日

症状

所有用户组策略,包括那些已在用户帐户或安全组或两者上进行安全过滤的用户组策略,可能无法在加入域的计算机上应用。

原因

如果组策略对象缺少 Authenticated Users 组的读取权限,或者您正在使用安全筛选并且缺少域计算机组的读取权限,则可能会出现此问题。

解析度

要解决此问题,请使用组策略管理控制台 (GPMC.MSC) 并执行以下步骤之一:

- 添加对组策略对象 (GPO) 具有读取权限的 Authenticated Users 组。
- 如果您使用安全过滤,请添加具有读取权限的域计算机组。

请参阅此链接部署 MS16-072,其中解释了所有内容并提供了修复受影响 GPO 的脚本。该脚本将向所有对已认证用户没有权限的 GPO 添加已认证用户的读取权限。

# Copyright (C) Microsoft Corporation. All rights reserved.

$osver = [System.Environment]::OSVersion.Version
$win7 = New-Object System.Version 6, 1, 7601, 0

if($osver -lt $win7)
{
    Write-Error "OS Version is not compatible for this script. Please run on Windows 7 or above"
    return
}

Try
{
    Import-Module GroupPolicy
}
Catch
{
    Write-Error "GP Management tools may not be installed on this machine. Script cannot run"
    return
}

$arrgpo = New-Object System.Collections.ArrayList

foreach ($loopGPO in Get-GPO -All)
{
    if ($loopGPO.User.Enabled)
    {
        $AuthPermissionsExists = Get-GPPermissions -Guid $loopGPO.Id -All | Select-Object -ExpandProperty Trustee | ? {$_.Name -eq "Authenticated Users"}
        If (!$AuthPermissionsExists)
        {
            $arrgpo.Add($loopGPO) | Out-Null
        }
    }
}

if($arrgpo.Count -eq 0)
{
    echo "All Group Policy Objects grant access to 'Authenticated Users'"
    return
}
else
{
    Write-Warning  "The following Group Policy Objects do not grant any permissions to the 'Authenticated Users' group:"
    foreach ($loopGPO in $arrgpo)
    {
        write-host "'$($loopgpo.DisplayName)'"
    }
}

$title = "Adjust GPO Permissions"
$message = "The Group Policy Objects (GPOs) listed above do not have the Authenticated Users group added with any permissions. Group policies may fail to apply if the computer attempting to list the GPOs required to download does not have Read Permissions. Would you like to adjust the GPO permissions by adding Authenticated Users group Read permissions?"

$yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes", `
    "Adds Authenticated Users group to all user GPOs which don't have 'Read' permissions"
$no = New-Object System.Management.Automation.Host.ChoiceDescription "&No", `
    "No Action will be taken. Some Group Policies may fail to apply"
$options = [System.Management.Automation.Host.ChoiceDescription[]]($yes, $no)
$result = $host.ui.PromptForChoice($title, $message, $options, 0)  
$appliedgroup = $null
switch ($result)
{
    0 {$appliedgroup = "Authenticated Users"}
    1 {$appliedgroup = $null}
}
If($appliedgroup)
{
    foreach($loopgpo in $arrgpo)
    {
        write-host "Adding 'Read' permissions for '$appliedgroup' to the GPO '$($loopgpo.DisplayName)'."
        Set-GPPermissions -Guid $loopgpo.Id -TargetName $appliedgroup -TargetType group -PermissionLevel GpoRead | Out-Null
    }
}
Run Code Online (Sandbox Code Playgroud)

如果您更喜欢为域计算机设置读取权限(就像我一样)而不是经过身份验证的用户,只需将其更改0 {$appliedgroup = "Authenticated Users"}0 {$appliedgroup = "Domain Computers"}

  • 为了增加一点混乱,对我来说,有必要添加包含用户的安全组和包含要应用策略的计算机的组。仅添加一个(用户或计算机)将导致无法应用该策略。它不一定需要是域计算机组,只要用户和计算机的组合在安全过滤中必须是有效的,如果策略应该适用。 (2认同)