# 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
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kenvb.gitbook.io/hyper-converged-solution-in-windows-server/preparing-the-servers/server-1-the-domain-controller.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
