Created
March 26, 2021 04:26
-
-
Save ryanmaclean/434352ae87967c0c5c46c03d4442d2bf to your computer and use it in GitHub Desktop.
Active Directory Install Script for Server 2019
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$DSRMPass = ConvertTo-SecureString -String "CHANGEME" -AsPlainText -Force | |
Install-WindowsFeature -Name AD-Domain-Services -IncludeManagementTools | |
Install-ADDSForest ` | |
-CreateDnsDelegation:$false ` | |
-DatabasePath "C:\Windows\NTDS" ` | |
-DomainMode 7 ` | |
-ForestMode 7 ` | |
-DomainName "lab.local" ` | |
-InstallDns:$true ` | |
-SafeModeAdministratorPassword $DSRMPass ` | |
-NoRebootOnCompletion:$false ` | |
-SysvolPath "C:\Windows\SYSVOL" ` | |
-LogPath "C:\Windows\NTDS" ` | |
-Force:$true | |
Write-Verbose "Rebooting DC1 to start domain" -Verbose |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment