上一章节我们讲到了通过 Ntdsutil 命令行进行 FSMO 角色迁移, 本章开始之前我们先讨论一下有关 FSMO 角色放置建议:
建议将架构主机角色 (Schema Master) 和域命名主机角色 (Domain Naming Master) 放在森林根域的 GC(全局编录)服务器上;
建议将架构主机角色 (Schema Master) 和域命名主机角色 (Domain Naming Master) 放在第一台域控制器上;
默认 Domain Naming Master 角色的域控制器必须同时也是 GC(全局编录)服务器;
不建议将 Infrastructure Master 和 GC 放在同一台域控制器上;
一般不建议把 PDC EmulatorRID Master 及 Infrastructure Master 放置在 GC 服务器上;
但那很多情况下管理员的一般针对单域林的操作方法是基础结构主机可以部署在域中的任意域控制器上, 而不管域控制器是否承载了全局编录; 针对多域林, 如果位于多域林中的指定域没有任何域控制器承载全局编录, 则基础结构主机必须部署在一个没有承载全局编录的域控制器上
本章我们将介绍通过 Powershell 进行 FSMO 角色迁移的方法(记得以管理员身份运行 Powershell, 如果没有执行权限, 记得 Set-ExecutionPolicy Unrestricted 调整执行权限), 希望以下内容可以帮到大家
1 查看当前 FSMO 角色信息:
查看林范围操作主机角色:
Get-ADForest azureyun.local |ft SchemaMaster,DomainNamingMaster
查看域范围操作主机角色:
Get-ADDomain azureyun.local |ft InfrastructureMaster,Pdcemulator,RidMaster
2 执行域命名主机角色 (Domain Naming Master)RID 主机角色(RID Master) 和基础架构主机角色 (Infrastructure Master) 迁移, 根据提示回车确认:
Move-ADDirectoryServerOperationMasterRole -Identity Bdc -OperationMasterRole DomainNamingMaster,InfrastructureMaster,RIDMaster -force
3 通过 Powershell 分别查看林范围跟域范围操作主机角色, 确认迁移操作是否成功:
- Get-ADForest azureyun.local |ft SchemaMaster,DomainNamingMaster
- Get-ADDomain azureyun.local |ft InfrastructureMaster,Pdcemulator,RidMaster
4 执行架构主机角色 (Schema Master)PDC 模拟主机角色(PDC Emulator) 角色迁移, 根据提示回车确认:
Move-ADDirectoryServerOperationMasterRole -Identity Bdc -OperationMasterRole SchemaMaster,PDCEmulator -Force
5 此时我们通过 Powershell 分别查看林范围跟域范围操作主机角色, 发现迁移均已成功:
- Get-ADForest azureyun.local |ft SchemaMaster,DomainNamingMaster
- Get-ADDomain azureyun.local |ft InfrastructureMaster,Pdcemulator,RidMaster
附操作实例图如下:
附快速操作流程:
A 查看当前域控制器名称, 并确认当前林范围跟域范围操作主机角色信息:
B 执行 Powershell 命令对五个角色进行一次性迁移操作:
Move-ADDirectoryServerOperationMasterRole -Identity Major -OperationMasterRole SchemaMaster,DomainNamingMaster,PDCEmulator,InfrastructureMaster,RIDMaster -force
移动操作主机角色
你要将角色 "SchemaMaster" 移动到服务器 "Major.azureyun.local" 中吗?
[Y] 是(Y) [A] 全是(A) [N] 否(N) [L] 全否(L) [S] 暂停(S) [?] 帮助 (默认值为 "Y"):
移动操作主机角色
你要将角色 "DomainNamingMaster" 移动到服务器 "Major.azureyun.local" 中吗?
[Y] 是(Y) [A] 全是(A) [N] 否(N) [L] 全否(L) [S] 暂停(S) [?] 帮助 (默认值为 "Y"):
移动操作主机角色
你要将角色 "PDCEmulator" 移动到服务器 "Major.azureyun.local" 中吗?
[Y] 是(Y) [A] 全是(A) [N] 否(N) [L] 全否(L) [S] 暂停(S) [?] 帮助 (默认值为 "Y"):
移动操作主机角色
你要将角色 "InfrastructureMaster" 移动到服务器 "Major.azureyun.local" 中吗?
[Y] 是(Y) [A] 全是(A) [N] 否(N) [L] 全否(L) [S] 暂停(S) [?] 帮助 (默认值为 "Y"):
移动操作主机角色
你要将角色 "RIDMaster" 移动到服务器 "Major.azureyun.local" 中吗?
[Y] 是(Y) [A] 全是(A) [N] 否(N) [L] 全否(L) [S] 暂停(S) [?] 帮助 (默认值为 "Y"):
PS C:\>
C 查看当前 FSMO 角色信息, 发现已经迁移成功
- PS C:\> Get-ADForest azureyun.local |ft SchemaMaster,DomainNamingMaster
- SchemaMaster DomainNamingMaster
- ------------ ------------------
- Major.azureyun.local Major.azureyun.local
- PS C:\> Get-ADDomain azureyun.local |ft InfrastructureMaster,Pdcemulator,RidMaster
- InfrastructureMaster Pdcemulator RidMaster
- -------------------- ----------- ---------
- Major.azureyun.local Major.azureyun.local Major.azureyun.local
通过图形化 Ntdsutil 命令行及 Powershell 命令三种方法进行 FSMO 角色迁移, 我们发现还是通过 Powershell 进行迁移操作更简单更快捷, 希望可以帮到大家
来源: https://www.cnblogs.com/wenzhongxiang/p/8459926.html