欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  科技

windows2008无人值守安装域控制器

程序员文章站 2022-05-18 23:13:53
转自:https://blog.csdn.net/techviewer/article/details/26485017 unattend.txt文件: 主要注释: dcpromo.exe /unattend:C:\Users\Administrator\Desktop\123.txt,这个是应答文 ......

转自: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/

windows2008无人值守安装域控制器

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

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