Set-ADReplicationSiteLink

Set-ADReplicationSiteLink is accessible with the help of addsadministration module. To install addsadministration on your system please refer to this link.

Synopsis

Sets the properties for an Active Directory site link.

Description

The Set-ADReplicationSiteLink cmdlet can be used to set properties on an Active Directory site link. A site link connects two or more sites. Site links reflect the administrative policy for how sites are to be interconnected and the methods used to transfer replication traffic. You must connect sites with site links so that domain controllers at each site can replicate Active Directory changes.

Parameters

-Add 
         Specifies values to add to an object property. Use this parameter to add one or more values to a property that cannot be modified using a cmdlet parameter. To modify an object property, you must use the LDAP display name. You can specify multiple values to a property by specifying a comma-separated list of values and more than one property by separating them using a semicolon.. The format for this parameter is

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

-AuthType <ADAuthType>
    Specifies the authentication method to use. Possible values for this parameter include:

    Required?                    false
    Position?                    named
    Default value                Microsoft.ActiveDirectory.Management.AuthType.Negotiate
    Accept pipeline input?       false
    Accept wildcard characters?  false

-Clear <String[]>
    Specifies an array of object properties that will be cleared in the directory. Use this parameter to clear one or more values of a property that cannot be modified using a cmdlet parameter. To modify an object property, you must use the LDAP display name. You can modify more than one property by specifying a comma-separated list. The format for this parameter is

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

-Cost <Int32>
    Specifies the cost to be placed on the site link. For more information on determining the cost, see the following topic called "Determining the Cost" in the TechNet Library: http://go.microsoft.com/fwlink/?LinkId=221871

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

-Credential <PSCredential>
    Specifies the user account credentials to use to perform this task. The default credentials are the credentials of the currently logged on user unless the cmdlet is run from an Active Directory PowerShell provider drive. If the cmdlet is run from such a provider drive, the account associated with the drive is the default.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

-Description <String>
    Specifies a description of the object. This parameter sets the value of the Description property for the object. The LDAP Display Name (ldapDisplayName) for this property is "description".

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

-Identity <ADReplicationSiteLink>
    Specifies an Active Directory object by providing one of the following property values. The identifier in parentheses is the LDAP display name for the attribute.

    Required?                    true
    Position?                    1
    Default value                
    Accept pipeline input?       True (ByValue)
    Accept wildcard characters?  false

-Instance <ADReplicationSiteLink>
    Specifies an instance of a site link object to use as a template for a new site link object.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

-PassThru <SwitchParameter>
    Returns the new or modified object. By default (i.e. if -PassThru is not specified), this cmdlet does not generate any output.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

-Remove <Hashtable>
    Specifies that the cmdlet remove values of an object property. Use this parameter to remove one or more values of a property that cannot be modified using a cmdlet parameter. To remove an object property, you must use the LDAP display name. You can remove more than one property by specifying a semicolon-separated list. The format for this parameter is

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

-Replace <Hashtable>
    Specifies values for an object property that will replace the current values. Use this parameter to replace one or more values of a property that cannot be modified using a cmdlet parameter. To modify an object property, you must use the LDAP display name. You can modify more than one property by specifying a comma-separated list. The format for this parameter is

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

-ReplicationFrequencyInMinutes <Int32>
    Species the frequency (in minutes) for which replication will occur where this site link is in use between sites. Active Directory preserves bandwidth between sites by minimizing the frequency of replication and by allowing you to schedule the availability of site links for replication. By default, intersite replication across each site link occurs every 180 minutes (3 hours). You can adjust this frequency to match your specific needs. Be aware that increasing this frequency increases the amount of bandwidth used by replication.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

-ReplicationSchedule <ActiveDirectorySchedule>
    Specifies the default replication schedule for any connections within this site link (intra-site replication). This allows you to schedule the availability of site links for use by replication. By default, a site link is available to carry replication traffic 24 hours a day, 7 days a week. You can limit this schedule to specific days of the week and times of day. You can, for example, schedule intersite replication so that it only occurs after normal business hours.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

-Server <String>
    Specifies the Active Directory Domain Services instance to connect to, by providing one of the following values for a corresponding domain name or directory server. The service may be any of the following:  Active Directory Lightweight Domain Services, Active Directory Domain Services or Active Directory Snapshot instance.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

-SitesIncluded <Hashtable>
    Specifies the list of sites included in the site link. For Set-ADReplicationSiteLink operations, you can add or include new sites within an existing site link by specifying them using this parameter. You do not have to specify all previously listed sites already within this link.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

-Confirm <SwitchParameter>
    Prompts you for confirmation before running the cmdlet.

    Required?                    false
    Position?                    named
    Default value                false
    Accept pipeline input?       false
    Accept wildcard characters?  false

-WhatIf <SwitchParameter>
    Shows what would happen if the cmdlet runs. The cmdlet is not run.

    Required?                    false
    Position?                    named
    Default value                false
    Accept pipeline input?       false
    Accept wildcard characters?  false

Syntax

Set-ADReplicationSiteLink [-WhatIf] [-Confirm] [-Add <Hashtable>] [-AuthType <ADAuthType>] [-Clear <String[]>] [-Cost <Int32>] [-Credential <PSCredential>] [-Description <String>] [-Identity] <ADReplicationSiteLink> [-PassThru] [-Remove <Hashtable>] [-Replace <Hashtable>] [-ReplicationFrequencyInMinutes <Int32>] [-ReplicationSchedule <ActiveDirectorySchedule>] [-Server <String>] [-SitesIncluded <Hashtable>] [<CommonParameters>]

Set-ADReplicationSiteLink [-WhatIf] [-Confirm] [-AuthType <ADAuthType>] [-Credential <PSCredential>] [-Instance <ADReplicationSiteLink>] [-PassThru] [-Server <String>] [<CommonParameters>]

————————– EXAMPLE 1 ————————–
C:\PS>Set-ADReplicationSiteLink “Europe-Asia” -SitesIncluded @{Add=”AP”;Remove=”Asia”}
Add site ‘AP’ to the site link ‘Europe-Asia’, and remove site ‘Asia’.

————————– EXAMPLE 2 ————————–
C:\PS>Get-ADReplicationSiteLink -Filter {ReplicationFrequencyInMinutes -ge 30} -Properties Cost | % {Set-ADReplicationSiteLink $_ -Cost 400}
Get all the site links in the directory with replication frequency greater than or equal to 30 minutes. Set the Cost property on these site link objects to 400.

————————– EXAMPLE 3 ————————–
C:\PS>$schedule = New-Object -TypeName System.DirectoryServices.ActiveDirectory.ActiveDirectorySchedule;
$schedule.ResetSchedule();
$schedule.SetDailySchedule(“Twenty”,”Zero”,”TwentyTwo”,”Thirty”);
Set-ADReplicationSiteLink “NA-SA” -ReplicationSchedule $schedule
Set the daily replication schedule of the site link with name ‘NA-SA’.

————————– EXAMPLE 4 ————————–
C:\PS>Set-ADReplicationSiteLink “Europe-Asia” -Replace @{‘options’=1}
Enable change notification on the site link with name ‘Europe-Asia’.

You can check the Version, CommandType and Source of this cmdlet by giving below command.

Get-Command Set-ADReplicationSiteLink

Get-Command Set-ADReplicationSiteLink powershell script command cmdlet

You can also read about
. Get-ADReplicationSiteLink
. New-ADReplicationSiteLink
. Remove-ADReplicationSiteLink

To know more PowerShell cmdlets(Commands) on addsadministration (Active Directory) click here

Click on this Link for an Single place where you get all the PowerShell cmdlet sorted based on the modules.

You can also refer other blogs on PowerShell at link

You can also refer other blogs on Microsoft at link

And also if you required any technology you want to learn, let us know below we will publish them in our site http://tossolution.com/

Like our page in Facebook and follow us for New technical information.

References are taken from Microsoft

Leave a Reply

Your email address will not be published. Required fields are marked *