-
List all the sites that currently exist in the
domain:
PS C:\> Get-ADReplicationSite -Filter * | ft Name
Name
----
Default-First-Site-Name
-
List all the domain controllers in the domain:
PS C:\> Get-ADDomainController -Filter * | ft Hostname
Hostname
--------
SEA-SRV-1.corp.contoso.com
SEA-SRV-5.corp.contoso.com
-
Create a new site named Branch-Office-One:
PS C:\> New-ADReplicationSite Branch-Office-One
-
Verify the creation of the new site:
PS C:\> Get-ADReplicationSite -Filter * | ft Name
Name
----
Default-First-Site-Name
Branch-Office-One
-
Create a new site link between the two sites, and enable the
change-notification process for replication:
PS C:\> New-ADReplicationSiteLink 'Hub-to-Branch-Office-One' `
-SitesIncluded Default-First-Site-Name,Branch-Office-One `
-OtherAttributes @{'options'=1}
-
Specify the cost and replication frequency for the new site
link:
PS C:\>Set-ADReplicationSiteLink Hub-to-Branch-Office-One `
-Cost 100 -ReplicationFrequencyInMinutes 15
-
Verify the results by viewing the properties of the new site
link:
PS C:\>Get-ADReplicationSiteLink -Filter {Name -eq "Hub-to-Branch-Office-One"}
Cost : 100
DistinguishedName : CN=Hub-to-Branch-Office-One,CN=IP,CN=Inter-Site
Transports,CN=Sites,CN=Configuration,
DC=corp,DC=contoso,DC=com
Name : Hub-to-Branch-Office-One
ObjectClass : siteLink
ObjectGUID : f9df8b3c-f8bc-4ca9-b082-09655e14c80b
ReplicationFrequencyInMinutes : 15
SitesIncluded : {CN=Branch-Office-One,CN=Sites,CN=Configuration,
DC=corp,DC=contoso,DC=com,CN=Default-First-
Site-Name,CN=Sites,CN=Configuration,DC=corp,
DC=contoso,DC=com}
-
Move domain controller SEA-SRV-5 from the hub site to the
branch office site:
PS C:\> Get-ADDomainController SEA-SRV-5.corp.contoso.com | `
Move-ADDirectoryServer -Site Branch-Office-One
-
Verify that the domain controller has been moved to the
branch office site:
PS C:\> Get-ADDomainController -Filter * | ft Hostname,Site
Hostname Site
-------- ----
SEA-SRV-1.corp.contoso.com Default-First-Site-Name
SEA-SRV-5.corp.contoso.com Branch-Office-One