本文涵蓋更新的 Active Directory 管理中心及其 Active Directory 回收站、精細的密碼原則,以及 Windows PowerShell 歷程記錄查看器的詳細數據,包括架構、常見工作的範例,以及疑難解答資訊。 如需簡介,請參閱 Introduction to Active Directory Administrative Center Enhancements (Level 100)。
Active Directory 管理中心架構
Active Directory 管理中心可執行檔和 DLL
Active Directory 管理中心的模組和基礎架構並未隨著回收站、精細的密碼原則和歷程記錄查看器功能而變更。
- Microsoft.ActiveDirectory.Management.UI.dll
- Microsoft.ActiveDirectory.Management.UI.resources.dll
- Microsoft.ActiveDirectory.Management.dll
- Microsoft.ActiveDirectory.Management.resources.dll
- ActiveDirectoryPowerShellResources.dll
以下說明顯示了回收站功能的 Windows PowerShell 基礎和操作層:
使用 Active Directory 管理中心啟用和管理 Active Directory 回收站
Capabilities
- Windows Server 2012 或更新的 Active Directory 管理中心可讓您設定及管理樹系中任何網域分割區的 Active Directory 回收站。 不再需要使用 Windows PowerShell 或 Ldp.exe 來啟用網域分割區中的 Active Directory 回收站或還原物件。
- Active Directory 管理中心提供進階篩選條件,可讓您在具有許多刻意刪除之物件的大型環境中較容易執行目標性還原。
Limitations
因為 Active Directory 管理中心只能管理網域分割區,所以無法從組態、網域 DNS 或樹系 DNS 分割區還原已刪除的物件。 (You can't delete objects from the Schema partition.) To restore objects from nondomain partitions, use Restore-ADObject.
Active Directory 管理中心無法在單一動作中還原物件的子樹。 例如,如果您刪除了一個包含巢狀 OU、使用者、群組和電腦的 OU,在還原基底 OU 時,不會還原其內的子物件。
Note
Active Directory 管理中心批次還原作業會盡力對 選取範圍內已刪除的物件進行排序,因此父系物件會在還原清單中的子系物件之前排序。 在簡單的測試案例中,物件的子樹可以透過一次操作進行還原。 但邊角案例,例如包含部分樹狀結構(部分已刪除父節點遺失的樹狀結構)或錯誤案例,例如在父還原失敗時略過子物件,可能無法如預期般運作。 因為這個原因,您應該在還原父對象之後,將物件的子目錄作為單獨的操作進行還原。
Active Directory 回收站需要 Windows Server 2008 R2 樹系功能等級,而且您必須是 Enterprise Admins 群組的成員。 啟用 Active Directory 回收站之後,您無法停用它。 Active Directory 回收站會增加樹系中每個域控制器上的 Active Directory 資料庫 (NTDS.DIT) 的大小。 資源回收筒所使用的磁碟空間會隨著時間持續增加,因為它會保留物件與其所有屬性資料。
使用 Active Directory 管理中心啟用 Active Directory 回收站
若要啟用 Active Directory 回收站,請開啟 Active Directory 管理中心 ,然後在瀏覽窗格中選取樹系的名稱。 From the Tasks pane, select Enable Recycle Bin.
Active Directory 管理中心會顯示 [啟用資源回收筒確認] 對話方塊。 這個對話方塊會警告您啟用資源回收桶是無法逆轉的。 Select OK to enable the Active Directory recycle bin. Active Directory 管理中心會顯示另一個對話框,提醒您,在所有域控制器複寫設定變更之前,Active Directory 回收站無法完全運作。
Important
如果下列條件發生,則無法使用啟用 Active Directory 回收站的選項:
- 樹系功能等級小於 Windows Server 2008 R2。
- 它已經啟用。
對等的 Active Directory Windows PowerShell Cmdlet 是:
Enable-ADOptionalFeature
如需使用 Windows PowerShell 啟用 Active Directory 回收站的詳細資訊,請參閱 Active Directory 回收站逐步指南。
使用 Active Directory 管理中心管理 Active Directory 回收站
本節使用名為 corp.contoso.com
的現有網域做為範例。 This domain organizes users into a parent OU named UserAccounts. The UserAccounts OU contains three child OUs named by department. 每個子 OU 都包含進一步的 OU、使用者和群組。
記憶體和篩選
Active Directory 回收站會保留樹系中刪除的所有物件。 It saves these objects according to the msDS-deletedObjectLifetime attribute, which by default is set to match the tombstoneLifetime attribute of the forest. In any forest created using Windows Server 2003 SP1 or later, the value of tombstoneLifetime is set to 180 days by default. In any forest upgraded from Windows 2000 or installed with Windows Server 2003 (no service pack), the default tombstoneLifetime attribute is not set and Windows therefore uses the internal default of 60 days. 這全都是可以加以設定的。 您可以使用 Active Directory 管理中心從樹系的網域分割還原任何已刪除的物件。 您必須繼續使用 Cmdlet Restore-ADObject
,從其他分割區還原已刪除的物件,例如 Configuration。 Enabling the Active Directory recycle bin makes the Deleted Objects container visible under every domain partition in the Active Directory Administrative Center.
The Deleted Objects container shows all the restorable objects in that domain partition. Deleted objects older than msDS-deletedObjectLifetime are known as recycled objects. Active Directory 管理中心不會顯示已回收的物件,而且您無法使用 Active Directory 管理中心來還原這些物件。
如需回收站架構和處理規則的更深入說明,請參閱 Active Directory 回收站:瞭解、實作、最佳做法和疑難解答。
Active Directory 管理中心以人為方式將一個容器傳回的預設物件數目限制為 20,000 個物件。 You can increase this limit as high as 100,000 objects by selecting the Manage menu and then selecting Management List Options.
Restoration
Filtering
Active Directory 管理中心提供功能強大的條件和篩選選項,您應該先熟悉這些條件和選項,以便在您需要於實際還原中使用它們時使用。 網域會在其存留期內刻意刪除許多物件。 由於已刪除的物件存留期可能為180天,因此在發生意外時,您無法還原所有物件。
Rather than writing complex LDAP filters and converting UTC values into dates and times, use the basic and advanced Filter menu to list only the relevant objects. 如果您知道刪除的日期、物件的名稱或任何其他關鍵資料,請利用該資料來進行篩選。 選取搜尋方塊右側的箭號,以切換進階篩選選項。
還原操作與任何其他搜尋相同,支援所有標準的篩選條件選項。 在內建的篩選條件中,還原物件的重要篩選條件通常包括:
- ANR (ambiguous name resolution - not listed in the menu, but it's used when you type in the Filter box)
- 上次修改時間 (介於指定日期之間)
- 物件為使用者/inetorgperson/電腦/群組/組織單位
- Name
- When deleted
- 上次已知父系
- 類型
- Description
- City
- Country/region
- Department
- Employee ID
- First name
- Job title
- Last name
- SAM accountname
- State/Province
- Telephone number
- UPN
- ZIP/Postal code
您可以新增多個條件。 例如,您可以在 2012 年 9 月 24 日從伊利諾伊州芝加哥找到已刪除的所有用戶物件,其職稱為 Manager。
您也可以在評估要復原哪些物件時,新增、修改或重新排列欄標題來提供更多詳細資料。
For more information about ANR, see ANR Attributes.
Single object
還原已刪除的物件一直都是單一操作。 Active Directory 管理中心可以讓該操作更簡單。 若要還原已刪除的物件,例如單一使用者:
- 選取 Active Directory 管理中心瀏覽窗格中的網域名稱。
- Double-click Deleted Objects in the management list.
- Right-click the object and then select Restore, or select Restore from the Tasks pane.
物件會還原至其原始位置。
Select Restore To to change the restore location. 如果已刪除物件的父容器也已刪除,但您不想還原父容器,這個選項就很有用。
多個對等物件
您可以還原多個對等層級物件,例如某個 OU 中的所有使用者。 按住 CTRL 鍵,然後選取一或多個您想要還原的已刪除物件。 Select Restore from the Tasks pane. 您也可以按住 CTRL 和 A 鍵來選取所有顯示的物件,或使用 SHIFT 並按下來選取一系列物件。
多個父物件和子物件
了解多父系子系還原的過程非常重要,因為 Active Directory 管理中心無法僅透過一個動作來還原已刪除物件的巢狀目錄。
- 還原樹狀目錄中最頂端的已刪除物件。
- 還原該父物件的直屬子系。
- 還原那些父物件的直屬子系。
- 視需要重複步驟,直到還原所有物件為止。
您不能在還原父物件之前還原子物件。 嘗試執行此還原作業會傳回下列錯誤:
The operation could not be performed because the object's parent is either uninstantiated or deleted.
「上次已知父系」 屬性會顯示每個物件的父系關係。 在還原父系之後重新整理 Active Directory 管理中心時,「上次已知父系」 屬性會從已刪除位置變更為已還原位置。 因此,當父物件的位置不再顯示已刪除物件的容器辨別名稱時,您可以還原該子物件。
考量一下系統管理員不小心刪除包含子系 OU 和使用者的 Sales OU 案例。
首先,觀察所有已刪除使用者的 Last Known Parent 屬性值,以及其讀取 OU=Sales\0ADEL:<guid+deleted 物件的容器辨別名稱>的方式:
篩選模糊名稱 Sales 以找回已刪除的 OU,然後將其還原。
重新整理 Active Directory 管理中心,以檢視已刪除使用者物件的「最後已知父屬」屬性變更為還原後的 Sales OU 辨別名稱。
篩選所有 Sales 使用者。 按住 CTRL + A 來選取所有已刪除的 Sales 使用者。 Select Restore to move the objects from the Deleted Objects container to the Sales OU with their group memberships and attributes intact.
If the Sales OU contained child OUs of its own, you should restore the child OUs first before restoring their children, and so on.
若要透過指定已刪除的父容器來還原所有巢狀的已刪除物件,請參閱 附錄 B:還原多個已刪除的 Active Directory 物件 (範例指令碼)。
用於還原已刪除之物件的 Active Directory Windows PowerShell Cmdlet 是:
Restore-ADObject
Restore-ADObject
Cmdlet 功能在 Windows Server 2008 R2 與 Windows Server 2012 之間並沒有變更。
Server-side filtering
一段時間後,已刪除的物件容器在中型和大型企業中可能會累積超過 20,000 個(甚至 10 萬個)物件,並難以顯示所有物件。 因為 Active Directory 管理中心中的篩選機制依賴客戶端篩選,所以無法顯示這些額外的物件。 若要解決這個限制,請使用下列步驟來執行伺服器端搜尋:
- Right-click the Deleted Objects container and select Search under this node.
- Select the chevron to expose the +Add criteria menu, select +Add and add Last modified between given dates. The Last Modified time (the whenChanged attribute) is a close approximation of the deletion time. 在大部分的環境中,它們都相同。 這個查詢會執行伺服器端搜尋。
- 在結果中,找出要還原的已刪除物件,方法是使用進一步的顯示篩選、排序等等,然後正常還原它們。
使用 Active Directory 管理中心設定和管理更細緻的密碼原則
設定更細緻的密碼原則
Active Directory 管理中心可讓您建立及管理更細緻的密碼原則 (FGPP) 物件。 Windows Server 2008 引進 FGPP 功能,但 Windows Server 2012 具有第一個圖形化管理介面。 您可以在網域層級套用細粒度密碼策略,使其能夠取代 Windows Server 2003 所需的單一網域密碼。 如果您使用不同的設定建立不同的 FGPP,個別使用者或群組就會在網域中取得不同的密碼原則。
如需微調密碼原則的詳細資訊,請參閱 AD DS Fine-Grained 密碼和帳戶鎖定原則逐步指南(Windows Server 2008 R2)。
In the Navigation pane, select Tree View, select your domain, select System, and then select Password Settings Container. In the Tasks pane, select New, and then select Password Settings.
管理細微的密碼政策
Creating a new FGPP or editing an existing one brings up the Password Settings editor. 您可以從這裡設定所有想要的密碼原則,就如同在 Windows Server 2008 或 Windows Server 2008 R2 中一樣,只有現在是使用具有特殊用途的編輯器。
Fill out all required (red asterisk) fields and any optional fields, and then select Add to set the users or groups that receive this policy. FGPP 會取代那些指定的安全性主體的預設網域原則設定。 在上述螢幕快照中,限制性原則只適用於內建的系統管理員帳戶,以避免遭到入侵。 該原則對標準使用者來說太過複雜而難以遵守,但是非常適合只有 IT 專業人員才會使用的高風險帳戶。
您也可以設定指定網域內原則的優先順序,以及原則要套用至哪些使用者和群組。
適用於更精細密碼原則的Active Directory Windows PowerShell Cmdlet 為:
Add-ADFineGrainedPasswordPolicySubject
Get-ADFineGrainedPasswordPolicy
Get-ADFineGrainedPasswordPolicySubject
New-ADFineGrainedPasswordPolicy
Remove-ADFineGrainedPasswordPolicy
Remove-ADFineGrainedPasswordPolicySubject
Set-ADFineGrainedPasswordPolicy
細微的密碼原則 Cmdlet 功能在 Windows Server 2008 R2 與 Windows Server 2012 之間沒有變更。 下圖說明 Cmdlet 的相關自變數:
Active Directory 管理中心也可讓您針對特定的使用者尋找已套用之 FGPP 的結果組。 以滑鼠右鍵按下任何使用者,然後選取 [ 檢視結果密碼設定 ],以開啟透過隱含或明確指派套用至該使用者的密碼 設定 頁面:
Examining the Properties of any user or group shows the Directly Associated Password Settings, which are the explicitly assigned FGPPs:
隱含的 FGPP 指派不會顯示於此。 為此,您必須使用 [ 檢視結果密碼設定 ] 選項。
使用 Active Directory 管理中心 Windows PowerShell 歷程記錄檢視器
Windows 管理未來會透過 Windows PowerShell 完成。 工作自動化架構上的分層圖形化工具可讓管理最複雜的分散式系統保持一致且有效率。 您必須了解 Windows PowerShell 的運作方式,才能完全發揮您的潛能並將您的運算投資發揮到淋漓盡致。
Active Directory 管理中心現在提供它所執行之所有 Windows PowerShell Cmdlet 的完整歷程記錄及它們的引數和值。 您可以將 Cmdlet 歷程記錄複製到其他地方供研究或修改及重複使用。 您可以建立工作附注來協助隔離 Active Directory 管理中心命令的 Windows PowerShell 結果。 您也可以篩選歷程記錄來尋找感興趣的點。
Active Directory 管理中心 Windows PowerShell 歷程記錄查看器的目的是要透過實際經驗來學習。
選取箭號以顯示 Windows PowerShell 歷程記錄查看器。
接著,建立使用者或修改群組的成員資格。 歷程檢視器會不斷更新,以摺疊檢視的方式顯示 Active Directory 管理中心用指定參數執行的每個 cmdlet。
展開任何感興趣的明細項目,即可查看提供給 Cmdlet 引數的所有值:
Select Start Task to create a manual notation before you use Active Directory Administrative Center to create, modify, or delete an object. 輸入您剛才在做什麼。 When done with your change, select End Task. 工作附注會將所有執行的動作分組成可折疊的附註,方便您更好地理解。
例如,若要查看用來變更用戶密碼並從群組中移除使用者的 Windows PowerShell 命令:
Selecting the Show All box also shows the Get-* verb Windows PowerShell cmdlets that only retrieve data.
歷程記錄查看器會顯示由 Active Directory 管理中心所執行的字面命令。 您可能會注意到某些 Cmdlet 似乎在不必要的情況下執行。 例如,您可以使用下列命令建立新的使用者:
New-ADUser
Active Directory 管理中心設計需要最少的程式代碼使用方式和模組化。 因此,它不會使用一組函式來建立新的使用者,使用另一組函式來修改現有的使用者,而是會以最低限度的方式執行每一個函式,然後以 Cmdlet 將它們鏈結在一起。 在學習 Active Directory Windows PowerShell 時,請記住這一點。 您也可以利用這點做為一個學習技巧,了解您可以如何簡單地使用 Windows PowerShell 來完成單一工作。
在 Active Directory 管理中心管理不同的網域
當您開啟 Active Directory 管理中心時,您目前在此電腦上登入的網域(本機網域)會出現在 Active Directory 管理中心瀏覽窗格中(左窗格)。 視您目前登入認證集的許可權而定,您可以檢視或管理此本機網域中的 Active Directory 物件。
您也可以使用相同的登入認證集和相同 Active Directory 管理中心實例,來檢視或管理相同樹系中任何其他網域中的 Active Directory 物件,或具有與本機網域建立信任的另一個樹系中的網域。 支援單向信任與雙向信任。 完成此程序沒有最低群組成員資格的限制。
Note
如果網域 A 與網域 B 之間有單向信任,網域 A 中的使用者可以存取網域 B 中的資源,但網域 B 中的使用者無法存取網域 A 中的資源,如果您在網域 A 是本機網域的計算機上執行 Active Directory 管理中心,則可以使用目前的登入認證集和相同 Active Directory 管理中心實例聯機到網域 B。
但是,如果您在網域 B 是您本機網域的計算機上執行 Active Directory 管理中心,則無法在 Active Directory 管理中心的相同實例中,使用相同的認證集連線到網域 A。
Windows Server 2012:使用目前一組登入認證來管理 Active Directory 管理中心所選實例中的外部網域
To open Active Directory Administrative Center, in Server Manager, select Tools, and then select Active Directory Administrative Center.
To open Add Navigation Nodes, select Manage, and then select Add Navigation Nodes.
在 [新增瀏覽節點] 中,選取 [連線到其他網域]。
In Connect to, type the name of the foreign domain that you want to manage (for example,
contoso.com
), and then select OK.當您成功連線到外部網域,可以瀏覽 [新增瀏覽節點] 視窗中的欄位,選擇要加入 Active Directory 管理中心瀏覽窗格的容器,然後選取 [確定]。
Windows Server 2008 R2:使用目前一組登入認證來管理 Active Directory 管理中心所選實例中的外部網域
To open Active Directory Administrative Center, select Start, select Administrative Tools, and then select Active Directory Administrative Center.
Tip
Another way to open Active Directory Administrative Center is to select Start, select Run, and then type dsac.exe.
然後開啟 [新增導覽節點],靠近 [Active Directory 系統管理中心] 視窗頂端,選取 [新增導覽節點]。
Tip
另一種開啟 [新增導覽節點] 的方法,是在 [Active Directory 管理中心] 瀏覽窗格中的空白處按下滑鼠右鍵,然後選取 [ 新增瀏覽節點]。
在 [新增瀏覽節點] 中,選取 [連線到其他網域]。
In Connect to, type the name of the foreign domain that you want to manage (for example,
contoso.com
), and then select OK.當您成功連線到外部網域,可以瀏覽 [新增瀏覽節點] 視窗中的欄位,選擇要加入 Active Directory 管理中心瀏覽窗格的容器,然後選取 [確定]。
使用與目前登入認證集不同的登入認證來管理網域
To open Active Directory Administrative Center at the command prompt, type the following command, and then select Enter:
runas /user:<domain\user> dsac
<domain\user>
是您想要使用 開啟 Active Directory 管理中心的認證集,而 dsac
是 Active Directory 管理中心可執行文件名稱。
開啟 Active Directory 管理中心時,瀏覽瀏覽窗格以檢視或管理您的 Active Directory 網域。
AD DS 管理疑難排解
Troubleshooting options
Logging Options
Active Directory 管理中心現在包含了內建記錄功能,做為追蹤設定檔的一部分。 請在 dsac.exe 所在的資料夾中建立/修改下列檔案:
dsac.exe.config
請建立下列內容:
<appSettings>
<add key="DsacLogLevel" value="Verbose" />
</appSettings>
<system.diagnostics>
<trace autoflush="false" indentsize="4">
<listeners>
<add name="myListener"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="dsac.trace.log" />
<remove name="Default" />
</listeners>
</trace>
</system.diagnostics>
The verbosity levels for DsacLogLevel are None, Error, Warning, Info, and Verbose. 您可以設定輸出檔案名稱,這個檔案會寫入至 dsac.exe 所在的資料夾。 輸出可以告訴您 Active Directory 管理中心的運作方式、與其連絡的域控制器、Windows PowerShell 命令執行的內容、回應為何,以及進一步的詳細數據。
For example, when you use the Info level, which returns all results except the trace-level verbosity:
DSAC.exe starts.
Logging starts.
要求域控制器傳回初始網域資訊。
[12:42:49][TID 3][Info] Command Id, Action, Command, Time, Elapsed Time ms (output), Number objects (output) [12:42:49][TID 3][Info] 1, Invoke, Get-ADDomainController, 2012-04-16T12:42:49 [12:42:49][TID 3][Info] Get-ADDomainController-Discover:$null-DomainName:"CORP"-ForceDiscover:$null-Service:ADWS-Writable:$null
從網域公司傳回的域控制器 DC1。
已載入 PS Active Directory 虛擬磁碟驅動器。
[12:42:49][TID 3][Info] 1, Output, Get-ADDomainController, 2012-04-16T12:42:49, 1 [12:42:49][TID 3][Info] Found the domain controller 'DC1' in the domain 'CORP'. [12:42:49][TID 3][Info] 2, Invoke, New-PSDrive, 2012-04-16T12:42:49 [12:42:49][TID 3][Info] New-PSDrive-Name:"ADDrive0"-PSProvider:"ActiveDirectory"-Root:""-Server:"dc1.corp.contoso.com" [12:42:49][TID 3][Info] 2, Output, New-PSDrive, 2012-04-16T12:42:49, 1 [12:42:49][TID 3][Info] 3, Invoke, Get-ADRootDSE, 2012-04-16T12:42:49
取得網域根 DSE 資訊。
[12:42:49][TID 3][Info] Get-ADRootDSE -Server:"dc1.corp.contoso.com" [12:42:49][TID 3][Info] 3, Output, Get-ADRootDSE, 2012-04-16T12:42:49, 1 [12:42:49][TID 3][Info] 4, Invoke, Get-ADOptionalFeature, 2012-04-16T12:42:49
取得網域 Active Directory 回收站資訊。
[12:42:49][TID 3][Info] Get-ADOptionalFeature -LDAPFilter:"(msDS-OptionalFeatureFlags=1)" -Server:"dc1.corp.contoso.com" [12:42:49][TID 3][Info] 4, Output, Get-ADOptionalFeature, 2012-04-16T12:42:49, 1 [12:42:49][TID 3][Info] 5, Invoke, Get-ADRootDSE, 2012-04-16T12:42:49 [12:42:49][TID 3][Info] Get-ADRootDSE -Server:"dc1.corp.contoso.com" [12:42:49][TID 3][Info] 5, Output, Get-ADRootDSE, 2012-04-16T12:42:49, 1 [12:42:49][TID 3][Info] 6, Invoke, Get-ADRootDSE, 2012-04-16T12:42:49 [12:42:49][TID 3][Info] Get-ADRootDSE -Server:"dc1.corp.contoso.com" [12:42:49][TID 3][Info] 6, Output, Get-ADRootDSE, 2012-04-16T12:42:49, 1 [12:42:49][TID 3][Info] 7, Invoke, Get-ADOptionalFeature, 2012-04-16T12:42:49 [12:42:49][TID 3][Info] Get-ADOptionalFeature -LDAPFilter:"(msDS-OptionalFeatureFlags=1)" -Server:"dc1.corp.contoso.com" [12:42:50][TID 3][Info] 7, Output, Get-ADOptionalFeature, 2012-04-16T12:42:50, 1 [12:42:50][TID 3][Info] 8, Invoke, Get-ADForest, 2012-04-16T12:42:50
取得 Active Directory 樹系。
[12:42:50][TID 3][Info] Get-ADForest -Identity:"corp.contoso.com" -Server:"dc1.corp.contoso.com" [12:42:50][TID 3][Info] 8, Output, Get-ADForest, 2012-04-16T12:42:50, 1 [12:42:50][TID 3][Info] 9, Invoke, Get-ADObject, 2012-04-16T12:42:50
取得支援加密類型、FGPP 和特定使用者資訊的架構資訊。
[12:42:50][TID 3][Info] Get-ADObject -LDAPFilter:"(|(ldapdisplayname=msDS-PhoneticDisplayName)(ldapdisplayname=msDS-PhoneticCompanyName)(ldapdisplayname=msDS-PhoneticDepartment)(ldapdisplayname=msDS-PhoneticFirstName)(ldapdisplayname=msDS-PhoneticLastName)(ldapdisplayname=msDS-SupportedEncryptionTypes)(ldapdisplayname=msDS-PasswordSettingsPrecedence))" -Properties:lDAPDisplayName -ResultPageSize:"100" -ResultSetSize:$null -SearchBase:"CN=Schema,CN=Configuration,DC=corp,DC=contoso,DC=com" -SearchScope:"OneLevel" -Server:"dc1.corp.contoso.com" [12:42:50][TID 3][Info] 9, Output, Get-ADObject, 2012-04-16T12:42:50, 7 [12:42:50][TID 3][Info] 10, Invoke, Get-ADObject, 2012-04-16T12:42:50
取得所有關於需要顯示給按下網域標題的管理員的網域物件資訊。
[12:42:50][TID 3][Info] Get-ADObject -IncludeDeletedObjects:$false -LDAPFilter:"(objectClass=*)" -Properties:allowedChildClassesEffective,allowedChildClasses,lastKnownParent,sAMAccountType,systemFlags,userAccountControl,displayName,description,whenChanged,location,managedBy,memberOf,primaryGroupID,objectSid,msDS-User-Account-Control-Computed,sAMAccountName,lastLogonTimestamp,lastLogoff,mail,accountExpires,msDS-PhoneticCompanyName,msDS-PhoneticDepartment,msDS-PhoneticDisplayName,msDS-PhoneticFirstName,msDS-PhoneticLastName,pwdLastSet,operatingSystem,operatingSystemServicePack,operatingSystemVersion,telephoneNumber,physicalDeliveryOfficeName,department,company,manager,dNSHostName,groupType,c,l,employeeID,givenName,sn,title,st,postalCode,managedBy,userPrincipalName,isDeleted,msDS-PasswordSettingsPrecedence -ResultPageSize:"100" -ResultSetSize:"20201" -SearchBase:"DC=corp,DC=contoso,DC=com" -SearchScope:"Base" -Server:"dc1.corp.contoso.com"
Setting the Verbose level also shows the .NET stacks for each function, but these don't include enough data to be useful except when you're troubleshooting after the dsac.exe suffers an access violation or crash. 此問題的兩個可能原因包括:
- Active Directory Web 服務未在任何可存取的域控制器上執行。
- 執行 Active Directory 管理中心的電腦無法與 Active Directory Web 服務進行網路通訊。
Important
另外還有稱為 Active Directory 管理閘道的頻外版本,可在 Windows Server 2008 SP2 和 Windows Server 2003 SP2 上執行。
當沒有任何 Active Directory Web 服務執行個體可用時,會顯示下列錯誤:
Error | Operation |
---|---|
「 無法連線到任何網域。 請重新整理或在網路連線恢復後再試一次。 | 在 Active Directory 管理中心應用程式啟動時顯示 |
「在執行 Active Directory Web 服務 (ADWS) 的 <NetBIOS domain name> 網域中找不到可用的伺服器。」 | 當您嘗試在 Active Directory 管理中心應用程式中選取網域節點時顯示 |
若要針對此問題進行疑難排解,請使用下列步驟:
驗證 Active Directory Web 服務是否在網域中的至少一個域控制器上啟動(最好是在樹系中的所有域控制器上)。 確定它已設定為在所有域控制器上自動啟動。
從執行 Active Directory 管理中心的電腦,執行下列 NLTest.exe 命令,驗證您是否可以找到執行 Active Directory Web 服務的伺服器:
nltest /dsgetdc:<domain NetBIOS name> /ws /force nltest /dsgetdc:<domain fully qualified DNS name> /ws /force
如果即使 Active Directory Web 服務正在執行,這些測試還是失敗,問題在於名稱解析或 LDAP,而不是 Active Directory Web 服務或 Active Directory 管理中心。 不過,如果 Active Directory Web 服務未在任何域控制器上執行,則此測試會失敗,並出現錯誤 「1355 0x54B ERROR_NO_SUCH_DOMAIN」,因此請在得出任何結論之前仔細檢查。
在 Nltest 傳回的域控制器上,使用此命令匯出接聽埠列表:
Netstat -anob > ports.txt
檢查 ports.txt 檔案,並驗證 Active Directory Web 服務服務正在埠 9389 上接聽。 For example:
TCP 0.0.0.0:9389 0.0.0.0:0 LISTENING 1828 [Microsoft.ActiveDirectory.WebServices.exe] TCP [::]:9389 [::]:0 LISTENING 1828 [Microsoft.ActiveDirectory.WebServices.exe]
如果服務正在接聽,請驗證 Windows 防火牆規則,並確定它們允許 9389 TCP 輸入。 根據預設,域控制器會啟用防火牆規則“Active Directory Web Services(TCP-in)。如果服務未接聽,請再次驗證它正在此伺服器上執行,然後重新啟動它。 確認沒有任何其他處理程序已經在連接埠 9389 上進行接聽。
在執行 Active Directory 管理中心的電腦上安裝 NetMon 或其他網路擷取公用程式,並在 Nltest 所傳回的域控制器上安裝。 在兩部電腦上同時進行網路擷取,當你啟動 Active Directory 管理中心並看到錯誤後,再停止擷取。 確認用戶端能夠透過連接埠 TCP 9389 傳送至網域控制站及從此網域控制站接收。 如果封包已傳送但從未到達,或者到達後域控制器有回應,但封包仍無法到達用戶端,則很可能是因為網路上的電腦之間有防火牆導致該埠上的封包被丟棄。 此防火牆可以是軟體或硬體,而且可以是非Microsoft端點保護(防病毒軟體)的一部分。