Using Windows PowerShell

To create an Active Directory site link using the Active Directory module for Windows PowerShell, use the New-ADReplicationSiteLink PowerShell cmdlet. An example of the simplest lines of PowerShell to achieve this goal looks like this:

Import-Module ActiveDirectory

New-ADReplicationSiteLink -Name "SiteLinkName" -SitesIncluded Site1,Site2

You can verify your change by listing the Active Directory sites:

Import-Module ActiveDirectory

Get-ADReplicationSiteLink -Filter * | Select Name