Demote or Promote Domain Controller
Both of these commands need to be ran under credentials that have authority to demote the server.
Both of these commands will prompt for new local administrator password
#This command will test if there are any problems with demotion
Test-ADDSDomainControllerUninstallation
#This will demote the server
Uninstall-ADDSDomainController
Install-WindowsFeature -name AD-Domain-Services -IncludeManagementTools
Install-ADDSDomainController -DomainName "centurionind.com" -InstallDns:$true -Credential (Get-Credential "centurionind.com\administrator")
**************************************************************
#
# Windows PowerShell script for AD DS Deployment
#
Import-Module ADDSDeployment
Install-ADDSDomainController `
-NoGlobalCatalog:$false `
-CreateDnsDelegation:$false `
-CriticalReplicationOnly:$false `
-DatabasePath "C:\Windows\NTDS2" `
-DomainName "RHSC.local" `
-InstallDns:$true `
-LogPath "C:\Windows\NTDS2" `
-NoRebootOnCompletion:$false `
-SiteName "RSI-Russia-DolinaSemyan" `
-SysvolPath "C:\Windows\SYSVOL2" `
-Force:$true
**************************************************************
#
# Windows PowerShell script for AD DS Deployment
#
Import-Module ADDSDeployment
Install-ADDSDomainController `
-NoGlobalCatalog:$false `
-CreateDnsDelegation:$false `
-CriticalReplicationOnly:$false `
-DatabasePath "C:\Windows\NTDS" `
-DomainName "RHSC.local" `
-InstallDns:$true `
-LogPath "C:\Windows\NTDS" `
-NoRebootOnCompletion:$false `
-SiteName "RSI-Russia-DolinaSemyan" `
-SysvolPath "C:\Windows\SYSVOL" `
-Force:$true
**************************************************************
New Domain ->
**************************************************************
#
# Windows PowerShell script for AD DS Deployment
#
Import-Module ADDSDeployment
Install-ADDSForest `
-CreateDnsDelegation:$false `
-DatabasePath "C:\Windows\NTDS" `
-DomainMode "WinThreshold" `
-DomainName "LemanEng.local" `
-DomainNetbiosName "LEMANENG" `
-ForestMode "WinThreshold" `
-InstallDns:$true `
-LogPath "C:\Windows\NTDS" `
-NoRebootOnCompletion:$false `
-SysvolPath "C:\Windows\SYSVOL" `
-Force:$true
**************************************************************
No Comments