Provisioning of Windows 2016 First AD Forest using PowerShell

Please refer to the following PowerShell Script that I used to setup my lab

1. Provisioning of First AD Forest

#Install AD Domain Services 
install-windowsfeature AD-Domain-Services -IncludeManagementTools

#Promote First AD Forest & Domain  
Import-Module ADDSDeployment
$Password = "P@ssw0rd!@#$" | ConvertTo-SecureString -AsPlainText -Force

Install-ADDSForest `
-CreateDnsDelegation:$false `
-DatabasePath “C:\Windows\NTDS” `
-DomainMode WinThreshold  ` #Windows 2016
-DomainName “mylab.aventistech.com” `
-DomainNetbiosName “MYLAB” `
-ForestMode WinThreshold ` #Windows 2016 
-InstallDns:$true `
-LogPath “C:\Windows\NTDS” `
-NoRebootOnCompletion:$false `
-SysvolPath “C:\Windows\SYSVOL” `
-SafeModeAdministratorPassword $Password `
-Force:$true

Leave a Comment