Created
June 24, 2017 10:05
-
-
Save TFaga/59d9f3d6746ff71f2670977160b2f685 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Install-windowsfeature AD-domain-services,DHCP,DNS | |
Install-ADDSDomainController -CreateDnsDelegation:$false -DomainName 'tf.com' -InstallDns:$true -NoGlobalCatalog:$false -SiteName 'Default-First-Site-Name' -NoRebootOnCompletion:$true -Force:$true -DatabasePath 'C:\Windows\NTDS' -SysvolPath 'C:\Windows\SYSVOL' -LogPath 'C:\Windows\NTDS' | |
netdom query fsmo | |
Move-ADDirectoryServerOperationMasterRole -Identity DC02-NEW -OperationMasterRole SchemaMaster, DomainNamingMaster, PDCEmulator, RIDMaster, InfrastructureMaster | |
Export-DhcpServer -File C:\DHCPdata.xml -Leases -Force -ComputerName old.network.local –Verbose | |
Import-DhcpServer -File C:\DHCPdata.xml -BackupPath C:\DHCP\ -Leases -ScopeOverwrite -Force -ComputerName new.network.local –Verbose | |
# Connect and deauthorize old and authorize new | |
# Don't forget to change the DNS server address | |
# Run locally | |
Uninstall-ADDSDomainController -DemoteOperationMasterRole -RemoveApplicationPartition | |
# Wait so all transition to new dns | |
Set-ADDomainMode –identity tf.com -DomainMode Windows2016Domain | |
Set-ADForestMode -Identity tf.com -ForestMode Windows2016Forest | |
Get-ADDomain | fl Name,DomainMode | |
Get-ADForest | fl Name,ForestMode |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment