> For the complete documentation index, see [llms.txt](https://kenvb.gitbook.io/hyper-converged-solution-in-windows-server/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kenvb.gitbook.io/hyper-converged-solution-in-windows-server/preparing-the-servers/server-1-the-domain-controller.md).

# Server 1: The Domain Controller

This and the other 2 servers will be installed using the "desktop experience".

I got 2 scripts you can copy paste:

* The first one sets up IP, name and installs the needed services for your DC
* The second one just finishes up your domain controller installation so you can go grab a cup of caffeine inducing beverage of your liking.

## Script 1

```
New-NetIPAddress -InterfaceAlias ethernet -IPAddress 192.168.1.10 -AddressFamily IPv4 -PrefixLength 24
Install-WindowsFeature -Name ad-domain-services
Rename-Computer dc -Restart
```

## Script 2

Run the script below to get through your setup of your domain controller. Yes that's a forced plaintext password, well spotted. Don't do this in production or the CSO will personally come and hunt you down in his chariot with spiked wheels on fire and pulled by all the damned souls of previous inconsiderate Sysadmins.

```
Import-Module ADDSDeployment
Install-ADDSForest `
-CreateDnsDelegation:$false `
-DatabasePath "C:\Windows\NTDS" `
-DomainMode "WinThreshold" `
-DomainName "Conlab.local" `
-DomainNetbiosName "CONLAB" `
-ForestMode "WinThreshold" `
-SafeModeAdministratorPassword (ConvertTo-SecureString -AsPlainText Labo1234 -Force) `
-InstallDns:$true `
-LogPath "C:\Windows\NTDS" `
-NoRebootOnCompletion:$false `
-SysvolPath "C:\Windows\SYSVOL" `
-Force:$true
```

## Before we move on

We're going to send some cluster cmdlets from our DC to our 2 nodes, so adding the powershell modules could prove handy.

```
Install-WindowsFeature rsat-clustering-powershell,hyper-v-powershell,hyper-v-tools, failover-clustering -includemanagementtools
```
