Search This Blog

Sunday, March 18, 2012

Windows Server 8 - DCPromo? Install domain Controller using the Command Line.

I am playing around with Windows Server 8, and wanted to setup a first domain controller for the Windows Server 8 test domain. Since I like the command-line, I configured the Ip address using the netsh cmdlet and changed the computer name using netdom. After the reboot, I reopened Powershell and ran "DcPromo", which gave me following answer:
  Darn, did DCpromo get removed? No, I not want to use the server manager, I want to use the command line tools ;). Lets try CMD.
Doh, what about powershell cmdlets?
First we Import the server manager to check the availability of Active Directory services:
Import-Module Servermanager
The feature we where looking for is the "AD-Domain-Services"
Add the feature using the Add-WindowsFeature CmdLet
Add-Windowsfeature AD-Domain-Services
Once the feature is installed you get access to a new powershell module. You can always check the installed modules by using the Get-Module CmdLet.
The new commandlet that is available is the ADDSDeployment. Import the new module:
Import-Module ADDSDeployment
No we are finally ready to install the Active Directory roles:
I used following command for setting up my Windows Server 8 test forest/domain
Install-ADDSForest -CreateDNSDelegation:$False -DataBasePath:C:\NTDS\ADDSDB -ForestMode Win8 -DomainName W8Test.local -DomainMode Win8 -DomainNetBiosName W8Test -InstallDNS:$True -LogPath C:\NTDS\Log -SysvolPath C:\NTDS\Sysvol -RebootOnCompletion:$True
You can also add the -Force parameter if you do not want to be promted.

 On completion the server will reboot, in which we have deployed our first Windows Server 8 domain Controller in our new Windows Server 8 Forest and domain.


1 comment:

  1. Tried the same thing myself last night (via the new Server Mananger) and got stuck as DCPromo flattly refused to do anything with DNS until I manually added a Primary Zone..
    Just wondering if you or anyone else had the same issue or if there was something I was missing?

    Also not sure why Microsoft felt the need to make us install the roles separately now when the good old DCPromo command of old did everything for you?