OpsaC - Operating as PowerShell code
published: February 27, 2015 author: Tinu tags: Domain Controller categories: Active Directory
Install-WindowsFeature -Name AD-Domain-Services -IncludeManagementTools
Check Server for DC-installation
Test-ADDSDomainControllerInstallation -DomainName $domain
Install additional Domain Controller
$domain = ""; $site = ""; $repldc = ""
Install-ADDSDomainController -InstallDns -DomainName $domain -SiteName $site`
-ReplicationSourceDC $repldc -SafeModeAdministratorPassword -NoRebootOnCompletion`
-DatabasePath "E:\NTDS" -LogPath "E:\NTDS" -SysvolPath "E:\SYSVOL"
Transfer forest-wide FSMO Roles to Target DC (beide Rollen sollten auf dem selben DC sein).
$targetdc = ""
Move-ADDirectoryServerOperationMasterRole -Identity $targetdc`
-OperationMasterRole SchemaMaster
Move-ADDirectoryServerOperationMasterRole -Identity $targetdc`
-OperationMasterRole DomainNamingMaster
Transfer domain-wide FSMO Roles to Target DC (alle Rollen sollten auf dem selben DC sein).
$targetdc = ""
Move-ADDirectoryServerOperationMasterRole -Identity $targetdc`
-OperationMasterRole PDCEmulator
Move-ADDirectoryServerOperationMasterRole -Identity $targetdc`
-OperationMasterRole RIDMaster
Move-ADDirectoryServerOperationMasterRole -Identity $targetdc`
-OperationMasterRole InfrastructureMaster
Der alte Domain Controller kann nun heruntergestuft und aus dem AD genommen werden.
Uninstall-ADDSDomainController -NoRebootOnCompletion