Servers have static addresses, so each one needs its VLAN set on the host and its address changed inside Windows. Move the second domain controller first.
Use the console, not Remote Desktop
The server drops off the network when its VLAN changes. Work from the Hyper-V console window.
Move the VM
Hyper-V host
Set-VMNetworkAdapterVlan -VMName "CON-DC-02" -Access -VlanId 20
Change its address
Select the card by MAC address. After a rebuild the card is often called "Ethernet 2", and commands that use the name fail.
CON-DC-02
$if = (Get-NetAdapter | Where-Object MacAddress -eq "00-15-5D-00-00-02").ifIndex # your MAC here Get-NetIPAddress -InterfaceIndex $if -AddressFamily IPv4 | Remove-NetIPAddress -Confirm:$false Remove-NetRoute -InterfaceIndex $if -DestinationPrefix "0.0.0.0/0" -Confirm:$false -ErrorAction SilentlyContinue New-NetIPAddress -InterfaceIndex $if -IPAddress 10.0.20.11 -PrefixLength 24 -DefaultGateway 10.0.20.1 Set-DnsServerForwarder -IPAddress 10.0.20.1 ipconfig /flushdns ipconfig /registerdns nltest /dsregdns
Clear the old DNS records
A domain controller leaves records for its old address in four places. Remove each one, or other machines keep trying the old address.
A domain controller
$old = "10.0.1.11" # the OLD address
"ad.contoso.com", "_msdcs.ad.contoso.com" | ForEach-Object {
$z = $_
Get-DnsServerResourceRecord -ZoneName $z -RRType A |
Where-Object { $_.RecordData.IPv4Address -eq $old } |
ForEach-Object { "$z $($_.HostName)" }
}
# check the list (expect @, DomainDnsZones, ForestDnsZones and gc), then remove each with
# Remove-DnsServerResourceRecord -ZoneName <zone> -Name <name> -RRType A -RecordData $old -ForceCheck before the next server
Either domain controller
dcdiag /q repadmin /replsummary
If repadmin reports error 58, run ipconfig /flushdns on both domain controllers and try again.
Repeat in this order
| Order | Server | VLAN | New address | After moving |
|---|---|---|---|---|
| 1 | CON-DC-02 | 20 | 10.0.20.11 | Point every other machine's DNS at the new address |
| 2 | CON-DC-01 | 20 | 10.0.20.10 | Check time with w32tm /query /status |
| 3 | CON-SYNC-01 | 30 | 10.0.30.20 | DNS to both DCs, then nltest /sc_reset:ad.contoso.com |
| 4 | CON-SYNC-02 | 30 | 10.0.30.21 | The same |
Update the DHCP scope's DNS servers after each domain controller moves.


