Windows2003域控迁移到Windows2008域控

1 前期背景:

现有DNSDHCP服务器域控为Windows 2003 系统,需要将Windows 2003 域控升级为2008.

2 环境:

主域控 :Server 2003 X86

迁移域控服务器:Server 2008 R2 X64

3 操作步骤

3.1 配置Windows server 2008域控兼容环境

  1. 首先将Windows 2008系统加入 Windows 2003 域控的域中。这里为测试的,暂为 shdc.com。加入以后重启2008系统。
    1

2

  1. 重启后用shdc\administrator登录2008系统。在测试进行之前,我们来查看一下, 现有的FSMO角色情况。(运行CMD,输入 etdom query fsmo),显示结果所有的角色都在2003的域控shdc-1中。
    3
  1. 在升级域控到 Windows Server 2008之前,必须进行相关的扩展,这一点,与从Windows Server 2000域升级到Windows Server 2003域一样。在这里我们必须在原 Windows Server 2003 域控制 器上运行Windows Server 2008ADPREP工具,该工具位于 Windows Server 2008光盘中的 Source\adprep目录下,请复制 adprep目录到Windows Server 2003域控制上的任意磁盘分区中(计算机名为:shdc-1),本案例将此文件夹复制 到SHDC-1的磁盘分区C

    特别说明,敬请留意:
    原 Windows Server 2000域升级到 Windows Server 2003域,只需对 Forest和 Domian进行扩展,但在 Windows Server 2003域升级到 Windows Server 2008域中,还必须对 RODC进行扩展,以便 Windows Server 2008能在基于 Windows Server 2003的域中担任域控制器类型角色


    4

  2. 下面操作在shdc-1(域控制器)上进行操作。

开始 -运行 -CMD,进入C分区的ADPREP目录输入 adprep /forestprep根据提示,选择”C “,并按下Enter键继续。
5
6

  1. 完成 Forest扩展。接下来的是RODC请输入:adprep /rodcprep(从显示结果

来看,似乎这些扩展已经更新了,但之前尝试过跳过 RODC扩展时,不能继续。)
7

  1. 完成 RODC的扩展之后,接下来进行的是Domain的扩展。 输入:adprep /domainprep /gpprep 结果出现如下错误。

8

网络搜索发现,没有提升域模式,在Active Directory用户和计算机中点击右键,提升域功能级别。

9

选择 Windows 2000纯模式。点提升。
10

  1. 再次运行adprep /domainprep /gpprep ,如下图。

11

  1. OK,我们已经做好了将 Windows Server2008(计算机名 Server2008)提升为域控 制器的准备工作。

3.2 提升Windows 2008 为域控制器

  1. 现在,以shdc\administrator身份登录成员服务器 Server 2008开始 -运行 - dcpromo(和Windows 2003中的类似)
    12
  1. 出现”Active Directory 域服务安装向导“,在该向导中,我们选中”`使用高级模式

安装“,点击下一步`:

13

  1. 在” Active Directory 域服务安装向导“中,我们选中” 现有林“中的”`向现有域添加

域控制器”,并点击“下一步` ”
14

  1. 点击“ 下一步 ”继续

15

  1. 选择域,点击“ 下一步 ”继续

16

  1. 选择站点,点击“ 下一步 ”继续

17

  1. “ 其他域控制器选项”,以这个选项中,默认的 角色为“ DNS服务器“和” 全局编录

“ ,而” 只读域控制器“,则为不可选,点击“ 下一步 ”继续

18

  1. 选择”是”继续。

19

  1. 默认选项,从现有的域控制器上接收更新数据。点击“下一步 ”继续
    20
  1. 点击“ 下一步 ”继续
    21
  1. 点击“ 下一步 ”继续
    22
  1. 设置目录服务还原模式密码。
    23
  1. 点击“ 下一步 ”开始提升 Server 2008为域控制器。
    24
  1. 其过程如图:
    25
    26
  1. 因为选中了“ 完成后重新启动 “,故 DCPROMO完成之后,系统自动启动。让我们来看 Server 2008提升为域控制器之后,ADUC的对比情况。

27

3.3 角色转移

  1. 接下来的工作,就是传说中的 FSMO角色的转移,首先我们要进行的是对架构主机角色的转移,在这之前,我们必须使用 regsvr32 schmmgmt.dll来注册Active Directory 架构 。以便利用 MMC工具来添加 架构 管理控制台。

    这个地方要注意,要以管理员身份运行CMD,否则会出错。2008直接在运行里输CMD似乎权限不够


    28
    29

  2. 开始 -运行 -MMC,打开微软管理控制台。这里我们要添加 Activer Directory架构 管理控制台。如下图。

30

  1. 右键单击“ Active Directory 架构 “根部,并且选择 “ 更改Active Directory 域控制器 “

31

  1. 选取要连接的域控制器 shdc-2.shdc.com

32

  1. 再次右键单击“ Active Directory 架构 “根部,并且选择 “ 操作主机 “在对话框中,点击“ 更改“,系统会提示您” 你确实要更改操作主机?“点击” 是 ”继续
    33

系统提示架构主机角色的已成功转移到 shdc-2.shdc.com 。

34

  1. 接下来的工作,就是分别将RID、PDC、基础结构主机角色转移到 shdc-2.com 。

    请在运行中输入dsa.msc打开 Active Directory 用户和计算机

注意:在以下主机角色转移之前,请右键 shdc.com根部,选择“更改域控制器“,

并且选中 2008域控

请右键 shdc.com根部,选择“ 操作主机“,依次将RID、PDC、Infrastructure主机角色转移到 shdc-2.com


35
36
37

  1. 最后我们需要做的是将域命名(Domain Name)主机,转移到 shdc-2.com上,打开 Active Directory域和信任关系,完成域命名主机的转移。

38
39

  1. 最后需要做的是取消 shdc-1.comGC(全局编录)角色,打开 Active Directory 站点和服务,依次选中 Site – Default First Site Name – Servers – shdc-1 ,右键单击 NTDS Setting,选择属性,然后将 全局编录 前面的勾去掉,只何留shdc-2.com(Windows 2008)为GC即可。
    40
  1. 最后确定一下各种主机角色的状态,在运行里输入 cmd进行命令提示行,输入
1
netdom query fsmo

41

  1. 至此 Windows Server 2003迁移到 Windows Server 2008完毕。

4 错误

4.1 错误1:

输入adprep /rodcprep报错

症状如下:

1
2
3
4
5
6
7
8
Adprep could not contact a replica for   partition DC=DomainDnsZones,DC=Contoso,DC=com 
  Adprep failed the operation on partition   DC=DomainDnsZones,DC=Contoso,DC=com Skipping to next partition. 
 
  Adprep could not contact a replica for   partition DC=ForestDnsZones,DC=Contoso,DC=com 
  Adprep encountered an LDAP error. Error code: 0x0.   Server extended error code: 0x0, Server error message: (null). 
 
  Adprep failed the operation on partition   DC=ForestDnsZones,DC=Contoso,DC=com Skipping to next partition. 
  Adprep completed with errors. Not all partitions are   updated.

原因是:

  1. 分区或在错误消息中不再存在引用分区

  2. 为引用的分区或分区结构主机已经强行降级或离线。

解决办法:

参考资料:

https://support.microsoft.com/zh-cn/kb/949257

http://bbs.51cto.com/thread-1067016-1-1.html

http://www.68idc.cn/help/jiabenmake/qita/2014040986015.html

备注:微软给出的fixfsmo.vbs脚本无需更改内容(当时纠结了一天,挺着心肝尝试了下,惨确定无须修改。)


Fixfsmo.vbs脚本内容如下

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
'-------fixfsmo.vbs------------------

const   ADS_NAME_INITTYPE_GC = 3

const   ADS_NAME_TYPE_1779 = 1

const   ADS_NAME_TYPE_CANONICAL = 2

 

set   inArgs = WScript.Arguments

 

if   (inArgs.Count = 1) then

    ' Assume the command line argument is the   NDNC (in DN form) to use.

    NdncDN = inArgs(0)

Else

    Wscript.StdOut.Write "usage: cscript   fixfsmo.vbs NdncDN"

End   if

 

if   (NdncDN <> "") then

 

    ' Convert the DN form of the NDNC into   DNS dotted form.

    Set objTranslator =   CreateObject("NameTranslate")

    objTranslator.Init ADS_NAME_INITTYPE_GC,   ""

    objTranslator.Set ADS_NAME_TYPE_1779,   NdncDN

    strDomainDNS =   objTranslator.Get(ADS_NAME_TYPE_CANONICAL)

    strDomainDNS = Left(strDomainDNS, len(strDomainDNS)-1)

    

    Wscript.Echo "DNS name: " &   strDomainDNS

 

    ' Find a domain controller that hosts   this NDNC and that is online.

    set objRootDSE =   GetObject("LDAP://" & strDomainDNS & "/RootDSE")

    strDnsHostName =   objRootDSE.Get("dnsHostName")

    strDsServiceName =   objRootDSE.Get("dsServiceName")

    Wscript.Echo "Using DC " &   strDnsHostName

 

    ' Get the current infrastructure fsmo.

    strInfraDN =   "CN=Infrastructure," & NdncDN

    set objInfra =   GetObject("LDAP://" & strInfraDN)

    Wscript.Echo "infra fsmo is "   & objInfra.fsmoroleowner

 

    ' If the current fsmo holder is deleted,   set the fsmo holder to this domain controller.

 

    if (InStr(objInfra.fsmoroleowner,   "\0ADEL:") > 0) then

 

        ' Set the fsmo holder to this domain   controller.

        objInfra.Put   "fSMORoleOwner",    strDsServiceName

        objInfra.SetInfo

 

        ' Read the fsmo holder back.

        set objInfra =   GetObject("LDAP://" & strInfraDN)

        Wscript.Echo "infra fsmo changed   to:" & objInfra.fsmoroleowner

 

    End if

 

End   if

分别运行运行脚本:

1
2
3
cscript fixfsmo.vbs DC = ForestDnsZones,DC = dealeasy,DC = local

cscript fixfsmo.vbs DC = DomainDnsZones,DC = dealeasy,DC = local

42

问题解决

5 附件:

链接: http://pan.baidu.com/s/1kVBPuuV 密码: aevv

-------------本文结束感谢您的阅读-------------

本文标题:Windows2003域控迁移到Windows2008域控

文章作者:OperationMAN

发布时间:2018年09月10日 - 15:09

最后更新:2022年06月05日 - 21:06

原始链接:https://kxinter.gitee.io/2018/09/10/Windows2003域控迁移到Windows2008域控/

许可协议: 署名-非商业性使用-禁止演绎 4.0 国际 转载请保留原文链接及作者。

坚持原创技术分享,您的支持将鼓励我继续创作!