windows2008无人值守安装域控制器

转自:https://blog.csdn.net/techviewer/article/details/26485017 

unattend.txt文件:

; DCPROMO unattend file (automatically generated by dcpromo) 
; Usage: 
;   dcpromo.exe /unattend:C:\Users\Administrator\Desktop\123.txt 
; 
[DCInstall] 
; New forest promotion 
ReplicaOrNewDomain=Domain 
NewDomain=Forest 
NewDomainDNSName=contoso.com 
ForestLevel=4 
DomainNetbiosName=CONTOSO 
DomainLevel=4 
InstallDNS=Yes 
ConfirmGc=Yes 
CreateDNSDelegation=No 
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) 
; RebootOnCompletion=Yes

 

主要注释:

dcpromo.exe /unattend:C:\Users\Administrator\Desktop\123.txt,这个是应答文件

NewDomainDNSName=contoso.com,新的DNS名称是“contoso.com”

ForestLevel=4,林功能级别是2008R2
InstallDNS=Yes,安装DNS服务
ConfirmGc=Yes,配置GC角色
CreateDNSDelegation=No,不创建DNS委派
DatabasePath="C:\Windows\NTDS",数据库文件路径
LogPath="C:\Windows\NTDS",日志文件路径
SYSVOLPath="C:\Windows\SYSVOL",SYSVOL路径

 

下面转自:http://www.pianshen.com/article/589051953/

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

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

 

posted @ 2019-03-15 13:56  feiquan  阅读(642)  评论(0编辑  收藏  举报
如果是此文是转载文章,本人会附上转载链接,此篇文章的版权归原创作者所属,如果侵权请与我联系,我会删除此文。

若没有标明转载链接,此篇文章属于本人的原创文章,其版权所属:
作者:feiquan
出处:http://www.cnblogs.com/feiquan/
版权声明:本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
大家写文都不容易,请尊重劳动成果~ 这里谢谢大家啦(*/ω\*)