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?

  • "Domain Controller for new domain"
  • "Additional DC for an existing domain"

CreateOrJoin

Domain Controller for new domain

Create

Domain to Forest relationship?

  • "Domain in new forest"
  • "Child domain in an existing domain tree"
  • "Domain tree in an existing forest"

NewDomain

Domain in new forest

Forest

Is DNS running on the machine?

  • "Yes, I will configure DNS"
  • "No, just install and configure DNS"

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

  • AD only
  • AD + NT4 domains

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: