6425C-Lab12 管理DC(1)

共有5个实验:

实验Lab12A:安装DC

实验Lab12B:安装Server Core的DC

实验Lab12C:传送FSMO

实验Lab12D:配置GC与通用组成员缓存

实验Lab12E:配置SYSVOL卷的DFS-R复制

 

========== 

实验12A:安装DC

共3个练习

练习1:使用安装向导创建额外的DC

练习2:从命令行添加一台DC

练习3:从安装介质创建一台DC

 

练习1:使用安装向导创建额外的DC

任务:使用安装向导提升一台DC

1. 启动HQDC2服务器,这是一台普通服务器,没有加入contoso.com域。以本地管理员身份登录。

2. 打开“命令提示符”,运行: dcpromo

3. 根据向导完成安装。

094623211.png

094623534.png

094623479.png

094623824.png

104246844.png094639677.png

094639644.png

094639222.png

094639285.png

094639569.png

094652327.png

095618519.png

 

4. 在“摘要”对话窗口,点击“导出”按钮,将配置信息输出到一个AdditionalDC.txt文本文件(自动应答文件)。 这个文件可用于无人值守安装。

103251838.png

103252553.png

 

5. 回到“摘要”对话窗口,单击“取消”按钮。

100046403.png

100046522.png

 

 

练习2:从命令行添加一台DC

任务1:创建dcpromo命令

1. 打开上一个练习保存的AdditionalDC.txt文件。文件内容为:

; DCPROMO unattend file (automatically generated by dcpromo)
; Usage:
; dcpromo.exe /unattend:C:\LabFiles\AdditionalDC.txt
;
; You may need to fill in password fields prior to using the unattend file.
; If you leave the values for "Password" and/or "DNSDelegationPassword"
; as "*", then you will be asked for credentials at runtime.
;
[DCInstall]
; Replica DC promotion
ReplicaOrNewDomain=Replica
ReplicaDomainDNSName=contoso.com
SiteName=Default-First-Site-Name
InstallDNS=Yes
ConfirmGc=Yes
CreateDNSDelegation=No
UserDomain=contoso.com
UserName=contoso.com\administrator
Password=*
DatabasePath="C:\Windows\NTDS"
LogPath="C:\Windows\NTDS"
SYSVOLPath="C:\Windows\SYSVOL"
; Set SafeModeAdminPassword to the correct value prior to using the unattend file
SafeModeAdminPassword=
; Run-time flags (optional)
; CriticalReplicationOnly=Yes
; RebootOnCompletion=Yes

 

2. 在文本编辑工具(例如:记事本)编辑上述文本。最前面加上“dcpromo.exe /unattend”。每个选项前面添加一个“/”符号,将“=”符号换成“:”。然后将所有参数都集中在一行上面。 结果如下:

dcpromo.exe /unattend /ReplicaOrNewDomain:Replica /ReplicaDomainDNSName:contoso.com /SiteName:Default-First-Site-Name /InstallDNS:Yes /ConfirmGc:Yes /CreateDNSDelegation:No /UserDomain:contoso.com /UserName:contoso.com\administrator /Password:* /DatabasePath:"C:\Windows\NTDS" /LogPath:"C:\Windows\NTDS" /SYSVOLPath:"C:\Windows\SYSVOL" /SafeModeAdminPassword:Pa$$w0rd /RebootOnCompletion:Yes

 

3.  选项“Password”的值用“*”符号,表示在命令行运行时根据提示输入。也可以在上述命令行中用明文写上密码。选项“SafeModeAdminPassword”的值必须改为密码的明文,否则运行时会报错。

 

4. 上述命令行可直接运行,就可以创建一台DC。本实验只是示例,无需运行。

 

 

任务2:从文件参数执行命令行

1. 用文本工具编辑C:\LabFiles\AdditionalDC.txt文件。在选项“SafeModeAdminPassword=”后面填上密码的明文。

 

2. 打开命令提示窗口。运行:

C:\Users\administrator>dcpromo.exe /unattend:C:\LabFiles\AdditionalDC.txt
正在检查是否已安装 Active Directory 域服务二进制文件...
Active Directory 域服务安装程序

正在验证环境和参数...

102047217.png

 

无法创建该 DNS 服务器的委派,因为无法找到有权威的父区域或者它未运行 Windows DNS
服务器。如果您要与现有 DNS 基础结构集成,应在父区域中手动创建对该 DNS 服务器的委
派,以确保来自域“contoso.com”以外的可靠名称解析。否则,不需要执行任何操作。

----------------------------------------
将执行下列操作:
将该服务器配置为域“contoso.com”的附加 Active Directory 域控制器。
。。。。。。

  

3. 安装完成后,HQDC2服务器自动重启。运行完成后,dcpromo.exe会修改无人值守文件,将其中的密码清空。

 

 

练习3:从安装介质创建一台DC

任务1(附加):将HQDC2降级

1. 在命令提示符下面运行:dcpromo

2. 根据向导完成降级操作。

105601739.png

105601992.png

105601877.png

105601286.png

105601526.png

105602831.png

 

3. 无人值守文件如下:

; DCPROMO unattend file (automatically generated by dcpromo)
; Usage:
; dcpromo.exe /unattend:C:\Users\administrator.CONTOSO\Desktop\a.txt
;
; You may need to fill in password fields prior to using the unattend file.
;
[DCInstall]
; Demotion
RetainDcMetadata=No
IsLastDCInDomain=No
; Set AdministratorPassword to the correct value prior to using the unattend file
AdministratorPassword=

 

 

任务2:创建安装介质

1. 转到HQDC1。在命令提示符下面运行:

C:\Users\Administrator>ntdsutil
ntdsutil: activate instance ntds
活动实例设置为“ntds”。
ntdsutil: ifm
ifm: create sysvol full C:\IFM
正在创建快照...
成功生成快照集 {c863822b-061d-4586-9dab-1ea69933545e}。
快照 {e67f269e-31ba-4ef8-9bc5-6f0b33234989} 已作为 C:\$SNAP_201305261059_VOLUMEC
$\ 装载
已装载快照 {e67f269e-31ba-4ef8-9bc5-6f0b33234989}。
已装载快照 {e67f269e-31ba-4ef8-9bc5-6f0b33234989}。
正在启动碎片整理模式...
源数据库: C:\$SNAP_201305261059_VOLUMEC$\Windows\NTDS\ntds.dit
目标数据库: C:\IFM\Active Directory\ntds.dit

Defragmentation Status (% complete)

0 10 20 30 40 50 60 70 80 90 100
|----|----|----|----|----|----|----|----|----|----|
...................................................

正在复制注册表文件...
正在复制 C:\IFM\registry\SYSTEM
正在复制 C:\IFM\registry\SECURITY
正在复制 SYSVOL...
正在复制 C:\IFM\SYSVOL
正在复制 C:\IFM\SYSVOL\contoso.com
正在复制 C:\IFM\SYSVOL\contoso.com\Policies
正在复制 C:\IFM\SYSVOL\contoso.com\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}
正在复制 C:\IFM\SYSVOL\contoso.com\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\GPT.INI
正在复制 C:\IFM\SYSVOL\contoso.com\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE
正在复制 C:\IFM\SYSVOL\contoso.com\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\Microsoft
正在复制 C:\IFM\SYSVOL\contoso.com\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9
}\MACHINE\Microsoft\Windows NT
正在复制 C:\IFM\SYSVOL\contoso.com\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\Microsoft\Windows NT\SecEdit
正在复制 C:\IFM\SYSVOL\contoso.com\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\Microsoft\Windows NT\SecEdit\GptTmpl.inf
正在复制 C:\IFM\SYSVOL\contoso.com\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\Registry.pol
正在复制 C:\IFM\SYSVOL\contoso.com\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\Scripts
正在复制 C:\IFM\SYSVOL\contoso.com\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9
}\MACHINE\Scripts\Shutdown
正在复制 C:\IFM\SYSVOL\contoso.com\Policies\{31B2F340-016D-11D2-945F-00C04FB984F
9}\MACHINE\Scripts\Startup
正在复制 C:\IFM\SYSVOL\contoso.com\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\USER
正在复制 C:\IFM\SYSVOL\contoso.com\Policies\{6AC1786C-016F-11D2-945F-00C04fB984F9}
正在复制 C:\IFM\SYSVOL\contoso.com\Policies\{6AC1786C-016F-11D2-945F-00C04fB984F9}\GPT.INI
正在复制 C:\IFM\SYSVOL\contoso.com\Policies\{6AC1786C-016F-11D2-945F-00C04fB984F9}\MACHINE
正在复制 C:\IFM\SYSVOL\contoso.com\Policies\{6AC1786C-016F-11D2-945F-00C04fB984F9}\MACHINE\Microsoft
正在复制 C:\IFM\SYSVOL\contoso.com\Policies\{6AC1786C-016F-11D2-945F-00C04fB984F9}\MACHINE\Microsoft\Windows NT
正在复制 C:\IFM\SYSVOL\contoso.com\Policies\{6AC1786C-016F-11D2-945F-00C04fB984F9}\MACHINE\Microsoft\Windows NT\SecEdit
正在复制 C:\IFM\SYSVOL\contoso.com\Policies\{6AC1786C-016F-11D2-945F-00C04fB984F9}\MACHINE\Microsoft\Windows NT\SecEdit\GptTmpl.inf
正在复制 C:\IFM\SYSVOL\contoso.com\Policies\{6AC1786C-016F-11D2-945F-00C04fB984F9}\USER
正在复制 C:\IFM\SYSVOL\contoso.com\scripts
快照 {e67f269e-31ba-4ef8-9bc5-6f0b33234989} 已卸载。
在 C:\IFM 中成功创建 IFM 媒体。
ifm: quit
ntdsutil: quit

C:\Users\Administrator>

 

 

任务3:使用安装介质提升一台DC

1. 把HQDC1服务器的C:\IFM文件夹复制到HQDC2服务器,文件夹仍为C:\IFM 。

2. 转到HQDC2服务器,以本地管理员身份登录。

3. 在命令提示符下面运行:dcpromo

4. 根据向导完成安装。

111849654.png

111849930.png

111849330.png

111849963.png

111849285.png

111937205.png

111937311.png

111938368.png

111938586.png

111938883.png

111938480.png

111938982.png

112005353.png

112005737.png

 

 

5. 无人值守文件如下:

; DCPROMO unattend file (automatically generated by dcpromo)
; Usage:
; dcpromo.exe /unattend:C:\Users\Administrator.HQDC2\Desktop\ab.txt
;
; You may need to fill in password fields prior to using the unattend file.
; If you leave the values for "Password" and/or "DNSDelegationPassword"
; as "*", then you will be asked for credentials at runtime.
;
[DCInstall]
; Replica DC promotion
ReplicaOrNewDomain=Replica
ReplicaDomainDNSName=contoso.com
SiteName=Default-First-Site-Name
InstallDNS=Yes
ConfirmGc=Yes
CreateDNSDelegation=No
UserDomain=contoso.com
UserName=contoso.com\administrator
Password=*
ReplicationSourcePath="C:\IFM"
DatabasePath="C:\Windows\NTDS"
LogPath="C:\Windows\NTDS"
SYSVOLPath="C:\Windows\SYSVOL"
; Set SafeModeAdminPassword to the correct value prior to using the unattend file
SafeModeAdminPassword=
; Run-time flags (optional)
; CriticalReplicationOnly=Yes
; RebootOnCompletion=Yes

 

 

 

========== 

实验12B:安装Server Core的DC

共2个练习:

练习1:将服务器加入域

练习2:提升为DC

 

练习1:将服务器加入域

任务1:为计算机修改IP地址和DNS

1. 运行以下命令:

 

C:\Users\Administrator>ipconfig

Windows IP 配置


以太网适配器 本地连接:

连接特定的 DNS 后缀 . . . . . . . : localdomain
本地链接 IPv6 地址. . . . . . . . : fe80::e153:3c85:24f4:f67c%21
IPv4 地址 . . . . . . . . . . . . : 192.168.226.145
子网掩码 . . . . . . . . . . . . : 255.255.255.0
默认网关. . . . . . . . . . . . . : 

隧道适配器 isatap.localdomain:

媒体状态 . . . . . . . . . . . . : 媒体已断开
连接特定的 DNS 后缀 . . . . . . . : localdomain

 

C:\Users\Administrator>netsh interface ipv4 set address name="本地连接" source=static address =192.168.1.3 mask=255.255.255.0 gateway=192.168.1.254

 

C:\Users\Administrator>netsh interface ipv4 set dns name="本地连接" source=static address=192.168.1.1 primay

 

C:\Users\Administrator>ipconfig /all

Windows IP 配置

主机名 . . . . . . . . . . . . . : WIN-CBSPR8S3TEF
主 DNS 后缀 . . . . . . . . . . . : 
节点类型 . . . . . . . . . . . . : 混合
IP 路由已启用 . . . . . . . . . . : 否
WINS 代理已启用 . . . . . . . . . : 否

以太网适配器 本地连接:

连接特定的 DNS 后缀 . . . . . . . : 
描述. . . . . . . . . . . . . . . : Intel(R) PRO/1000 MT Network Connection
物理地址. . . . . . . . . . . . . : 00-0C-29-60-F2-98
DHCP 已启用 . . . . . . . . . . . : 否
自动配置已启用. . . . . . . . . . : 是
本地链接 IPv6 地址. . . . . . . . : fe80::e153:3c85:24f4:f67c%21(首选) 
IPv4 地址 . . . . . . . . . . . . : 192.168.1.3(首选) 
子网掩码 . . . . . . . . . . . . : 255.255.255.0
默认网关. . . . . . . . . . . . . : 192.168.1.254
DHCPv6 IAID . . . . . . . . . . . : 352324649
DHCPv6 客户端 DUID . . . . . . . : 00-01-00-01-19-33-3A-2F-00-0C-29-60-F2-98
DNS 服务器 . . . . . . . . . . . : 192.168.1.1
TCPIP 上的 NetBIOS . . . . . . . : 已启用

隧道适配器 isatap.{06FA56D7-89EA-4ACD-9745-222EFC40FCB4}:

媒体状态 . . . . . . . . . . . . : 媒体已断开
连接特定的 DNS 后缀 . . . . . . . : 
描述. . . . . . . . . . . . . . . : Microsoft ISATAP Adapter #20
物理地址. . . . . . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP 已启用 . . . . . . . . . . . : 否
自动配置已启用. . . . . . . . . . : 是

 

任务2:修改计算机名

1. 运行以下命令:

C:\Users\Administrator>netdom renamecomputer %computername% /newname:HQDC3
此操作将计算机 WIN-CBSPR8S3TEF
重命名为 HQDC3 。
某些服务(如证书颁发机构)依赖于固定的计算机名。
如果此类型的任何服务在 WIN-CBSPR8S3TEF 上运行,
则计算机名更改将产生负面影响。
您要继续吗(Y 或 N)?
Y

需要重新启动计算机才能完成此操作。
命令成功完成。

 

C:\Users\Administrator>shutdown -r -t 0

 

 

任务3:将计算机加入域

1. 运行以下命令:

C:\Users\Administrator>netdom join %computername% /domain:contoso.com /UserD:contoso\Administrator /PasswordD:*
键入与域用户相关联的密码:

 

需要重新启动计算机才能完成此操作。
命令成功完成。

 

C:\Users\Administrator>shutdown -r -t 0

 

 

练习2:提升为DC

任务1:添加DNS角色

1. 在contoso\administrator帐户登录到HQDC3服务器。

2. 检查DNS-Server-Core-Role角色是否已经安装。运行以下命令:dclist

C:\Users\Administrator.CONTOSO>oclist
使用通过 Ocsetup.exe 列出的更新名称来安装/卸载服务器角色或可选功能。

不支持使用 OCSetup.exe 添加或删除 Active Directory 角色。该操作可能导致服务器处于不稳定状态。请始终使用 DCPromo 安装或卸载 Active Directory。

===========================================================================
Microsoft-Windows-ServerCore-Package
未安装:BitLocker
未安装:BitLocker-RemoteAdminTool
未安装:CertificateServices
未安装:ClientForNFS-Base
未安装:CoreFileServer
未安装:DFSN-Server
未安装:DFSR-Infrastructure-ServerEdition
未安装:DHCPServerCore
未安装:DNS-Server-Core-Role
。。。。。。

 

3. 安装角色。注意角色名称输入时对大小写敏感。

C:\Users\Administrator.CONTOSO>ocsetup DNS-Server-Core-Role

 

C:\Users\Administrator.CONTOSO>oclist
使用通过 Ocsetup.exe 列出的更新名称来安装/卸载服务器角色或可选功能。

不支持使用 OCSetup.exe 添加或删除 Active Directory 角色。该操作可能导致服务器处于不稳定状态。请始终使用 DCPromo 安装或卸载 Active Directory。

===========================================================================
Microsoft-Windows-ServerCore-Package
未安装:BitLocker
未安装:BitLocker-RemoteAdminTool
未安装:CertificateServices
未安装:ClientForNFS-Base
未安装:CoreFileServer
未安装:DFSN-Server
未安装:DFSR-Infrastructure-ServerEdition
未安装:DHCPServerCore
  已安装:DNS-Server-Core-Role
。。。。。。

 

 

任务2:提升为DC

1. 在命令提示符下面运行:

C:\Users\Administrator.CONTOSO>dcpromo.exe /unattend /ReplicaOrNewDomain:Replica /ReplicaDomainDNSName:contoso.com /ConfirmGc:Yes /UserName:contoso.com\administrator /Password:* /SafeModeAdminPassword:Pa$$w0rd

 
正要检查是否已安装 Active Directory 域服务二进制文件...
正在安装 Active Directory 域服务二进制文件... 
Active Directory 域服务安装程序
。。。。。。

 

 

 

2. 安装完成后自动重启服务器。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值