Skip to content

Instantly share code, notes, and snippets.

@azure365pro
Created May 13, 2020 17:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azure365pro/3f945b88e1d004c7688df986f6e5d398 to your computer and use it in GitHub Desktop.
Save azure365pro/3f945b88e1d004c7688df986f6e5d398 to your computer and use it in GitHub Desktop.
Active Directory Quick Deployment Scripts
#
# Active Directory Quick Deployment Script
# Adding Domain Controller
#
# One Line has to be Edited
# -DomainName "Enter your Domain Name" `
#
# Note : Sitename is specified as default site name
#
Install-windowsfeature AD-domain-services -IncludeManagementTools
Import-Module ADDSDeployment
Install-ADDSDomainController `
-NoGlobalCatalog:$false `
-CreateDnsDelegation:$false `
-CriticalReplicationOnly:$false `
-DatabasePath "C:\Windows\NTDS" `
-DomainName "testexchange.biz" `
-InstallDns:$true `
-LogPath "C:\Windows\NTDS" `
-NoRebootOnCompletion:$false `
-SiteName "Default-First-Site-Name" `
-SysvolPath "C:\Windows\SYSVOL" `
-Force:$true
#
# Active Directory Quick Deployment Script
#
# Two Lines has to be Edited
# -DomainName "Enter your Domain Name" `
# -DomainNetbiosName "Enter NETBIOS NAME"
# If your domain name is CareExchange.in - Recommended Netbios name is CareExchange
# Netbios name cannot be more than 11 Characters
#
Install-windowsfeature AD-domain-services -IncludeManagementTools
Import-Module ADDSDeployment
Install-ADDSForest `
-CreateDnsDelegation:$false `
-DatabasePath "C:\Windows\NTDS" `
-DomainMode "Win2012R2" `
-DomainName "testexchange.biz" `
-DomainNetbiosName "TESTEXCHANGE" `
-ForestMode "Win2012R2" `
-InstallDns:$true `
-LogPath "C:\Windows\NTDS" `
-NoRebootOnCompletion:$false `
-SysvolPath "C:\Windows\SYSVOL" `
-Force:$true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment