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
不支持,因为它没有powershell
,R2
是支持的
在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