轉自: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/
文件中已經說明瞭該文件的使用方法:
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