windows域管理(二) 建立 AD DS域

版权声明:欢迎提问:[email protected] https://blog.csdn.net/include_heqile/article/details/83548602

Active Directory数据库的存储

在安装Active Directory时可以指定存储位置

使用应答文件安装AD

在最后创建AD完成时,可以选择导出设置,保存为一个应答文件,我们可以编辑该应答文件并使用它来进行AD的**无人值守(unattend)**安装

; DCPROMO unattend file (automatically generated by dcpromo)
; Usage:
;   dcpromo.exe /unattend:C:\Users\1234\Documents\Answer.txt
;
[DCInstall]
; New forest promotion
InstallDNS=yes
ReplicaOrNewDomain=Domain
NewDomain=Forest
NewDomainDNSName=sayms.com
ForestLevel=3
DomainNetbiosName=SAYMS
DomainLevel=3
ConfirmGc=Yes
CreateDNSDelegation=No
DatabasePath="%systemroot%\NTDS"
LogPath="%systemroot%\NTDS"
SYSVOLPath="%systemroot%\SYSVOL"
; Set SafeModeAdminPassword to the correct value prior to using the unattend file
SafeModeAdminPassword=v201303036.
; Run-time flags (optional)
RebootOnCompletion=Yes

我们可以使用该文件进行AD的创建,关于该文件中参数的解释:

文件中已经说明了该文件的使用方法:

dcpromo.exe /unattend:“C:\Users\1234\Documents\Answer.txt”

使用命令行安装AD

windows server 2008不支持,因为它没有powershellR2是支持的
powershell中执行如下命令:

dcpromo /unattend /InstallDns:yes /newDomain:forest 
/replicaOrNewDomain:domain /newDomainDnsName:sayms.com 
/DomainNetbiosName:SAYMS /forestLevel:4 /domainLevel:4 
/createDNSDelegation:no 
/databasePath:"%SystemRoot%\NTDS" /logPath:"%SystemRoot%\NTDS" /sysvolpath:"%SystemRoot%\SYSVOL" 
/safeModeAdminPassword:v201303036. 
/rebootOnCompletion:yes

其实和上面的应答文件差不多,注意,要写成一行,上面是为了易于查看才截开的

dcpromo /unattend /InstallDns:yes /newDomain:forest /replicaOrNewDomain:domain /newDomainDnsName:sayms.com /DomainNetbiosName:SAYMS /forestLevel:4 /domainLevel:4 /createDNSDelegation:no /databasePath:"%SystemRoot%\NTDS" /logPath:"%SystemRoot%\NTDS" /sysvolpath:"%SystemRoot%\SYSVOL" /safeModeAdminPassword:v201303036. /rebootOnCompletion:yes


上面的应答文件安装命令行安装都属于无人值守安装,在安装前应该切换为administrator用户,把IP设置为静态,首选DNS服务器指向自己,计算机名更改为dc1


猜你喜欢

转载自blog.csdn.net/include_heqile/article/details/83548602