Automating WSS v3/MOSS 2007 development environment setup: part IV – Unattended DC Promo
Hello,
In the previous post, I described how to setup Windows Server 2003 an unattended way. Now, I'll describe how to transform this server in a Domain Controller.
It's quite simple; just use an answer file, as an argument to the dcpromo.exe instruction.
Now, like all answer files, a lot of crap (sorry, options) disturbs you from your simple objective.
When you use dcpromo in GUI mode (typing dcpromo), you're prompted for various information. To help creating your answer file, I set the matching between GUI info and [DCInstall] section for an answer file:
GUI Question |
Options |
[DCInstall] field |
Example value | ||
GUI |
Answer file | ||||
Domain Controller type? |
|
CreateOrJoin |
Domain Controller for new domain |
Create | |
Domain to Forest relationship? |
|
NewDomain |
Domain in new forest |
Forest | |
Is DNS running on the machine? |
|
DNSOnNetwork |
"No, just install and configure DNS" |
No | |
Full DNS name for new domain |
|
NewDomainDNSName |
ad.moss | ||
Domain NetBIOS name |
|
DomainNetBiosName |
AD | ||
Active Directory Database folder |
|
DatabasePath |
%SYSTEMROOT%\AD-Data | ||
Active Directory Log folder |
|
LogPath |
%SYSTEMROOT%\AD-Logs | ||
SYSVOL folder |
|
SysVolPath |
%SYSTEMDRIVE%\AD-Sysvol | ||
Permissions compatibility |
|
SetForestVersion |
AD only |
Yes | |
Restore mode password
|
|
SafeModeAdminPassword |
admoss |
Answer file allow you to set additional parameters (hopefully). For me, these additional settings should help automating and securing the setup:
[DCInstall] field |
Value I use |
Comments |
DisableCancelForDnsInstall |
Yes |
Remove the cancel button during DNS service setup |
RebootOnSuccess |
Yes |
Restarts the server upon successful completion of the dcpromo |
ReplicaOrNewDomain |
Domain |
Specify to install the server as the first DC of a new domain (require TreeOrChild value) |
TreeOrChild |
Tree |
Specifies that the new domain is the root of a new tree |
SiteName |
MOSSDevOffice |
It's always fun to set names directly ! |
So, the final file looks like this (named dcpromoanswer.txt for me):
[DCInstall]
CreateOrJoin = Create
NewDomain = Forest
DNSOnNetwork = No
NewDomainDNSName = ad.moss
DomainNetBiosName = AD
DatabasePath = %SYSTEMROOT%\AD-Data
LogPath = %SYSTEMROOT%\AD-Logs
SysVolPath = %SYSTEMDRIVE%\AD-Sysvol
SetForestVersion = Yes
SafeModeAdminPassword = admoss
DisableCancelForDnsInstall = Yes
RebootOnSuccess = Yes
ReplicaOrNewDomain = Domain
TreeOrChild = Tree
SiteName = MOSSDevOffice
That's it. With this file, you promote the server as a DC (after processing time and reboot).
Launch the process typing: "dcpromo /answer:dcpromoanswer.txt", server reboots, and here you are!
2 notes here:
- Don't forget to keep the Windows Server 2003 CD inserted in the VM (for DNS install)
- To have the answer file available easily, store it on a distinct VHD file ;-)
Now the platform is ready to be transformed to a MOSS 2007 development platform.
<Emmanuel/>
Post Scriptum:
Few Screen Clippings durig DCpromo operation:
1. Operation launched:
2. Operation in progress:
3. Server in the Domain:
Comments
Anonymous
April 17, 2009
Hi, This long post series raised interest from many of you. Thanks for that. I was asked few times toAnonymous
April 20, 2009
Un petit post rapide pour linker une excellente série faite par Emmanuel Bergerat sur son blog : Automating