Active-Directory

GPO 未能申請;原因:無法訪問、為空或已禁用;伺服器 2012 R2 和 Windows 10

  • October 9, 2016

我有一個 Windows Server 2012 R2 域。

昨天,一台電腦(執行 Windows 10 Pro)的網路驅動器停止工作。

經過進一步調查 ( gpresult /h) 後,似乎所有組策略對像都因原因​​而失敗Inaccessible, Empty, or Disabled

我已經確認所有 GPO 仍然存在並且在(冗餘和本地)域控制器上都啟用。此外,在同一個域和 LAN 上還有 20 台其他機器絕對沒有問題。

但是,我測試過的另一台電腦也出現了同樣的問題!這是否意味著問題出在伺服器上?

gpresult /r報告一個客戶端從本地 DC1 獲取 GPO,另一個從 DC2 獲取 GPO。因此,這不是與特定 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 位版本並且已經完全更新。為了確定,我已經重新啟動了所有這些。

檢查更新檔 joeqwerty連結

有一個重要的細節:

已知的問題

MS16-072 更改檢索使用者組策略的安全上下文。這種設計上的行為更改可保護客戶的電腦免受安全漏洞的影響。在安裝 MS16-072 之前,使用使用者的安全上下文檢索使用者組策略。安裝 MS16-072 後,使用機器安全上下文檢索使用者組策略。此問題適用於以下知識庫文章:

  • 3159398 MS16-072:組策略安全更新說明:2016 年 6 月 14 日
  • 3163017 Windows 10 累積更新:2016 年 6 月 14 日
  • 3163018 Windows 10 版本 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 的腳本。該腳本將 Authenticated 使用者讀取權限添加到對 Authenticated 使用者沒有權限的所有 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
   }
}

如果您喜歡設置域電腦的讀取權限(就像我一樣)而不是經過身份驗證的使用者,只需將其更改0 {$appliedgroup = "Authenticated Users"}0 {$appliedgroup = "Domain Computers"}

引用自:https://serverfault.com/questions/784615