Sync-ADObject

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

Synopsis

Replicates a single object between any two domain controllers that have partitions in common.

Description

The Sync-ADObject cmdlet replicates a single object between any two domain controllers that have partitions in common. The two domain controllers do not need to be direct replication partners. It can also be used to populate passwords in a read-only domain controller (RODC) cache.

Parameters

 -AuthType 
         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

-Credential <PSCredential>
    Specifies a user account that has permission to perform this action. The default is the current user.

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

-Destination <String>
    Specifies the identity of the Active Directory server that acts as the destination for synchronizing this data. This parameter works similarly to the Server parameter as used on the Set-Object cmdlet with some restrictions. It does not allow domain or forest names to be used.

    Required?                    true
    Position?                    3
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

-Object <ADObject>
    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                None
    Accept pipeline input?       True (ByValue)
    Accept wildcard characters?  false

-PassThru <SwitchParameter>
    Returns the object once it has been synchronized on the destination server. By default if the PassThru parameter is not specified, this cmdlet does not generate any output.

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

-PasswordOnly <SwitchParameter>
    Populates a read-only domain controller (RODC) password cache with the password of the account specified in the Object parameter. If specified, no other data is replicated other than the password.

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

-Source <String>
    Specifies the identity of the Active Directory server that acts as the source for synchronizing this data. This parameter works similarly to the Server parameter as used on the Set-Object cmdlet with some restrictions. It does not allow domain or forest names to be used.

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

Syntax

Sync-ADObject [-AuthType <ADAuthType>] [-Credential <PSCredential>] [-Destination] <String> [-Object] <ADObject> [-PassThru] [-PasswordOnly] [[-Source] <String>] [<CommonParameters>]

————————– EXAMPLE 1 ————————–
C:\PS>Sync-ADObject “CN=AM,OU=AccountDeptOU,DC=delhi,DC=TOSSolution,DC=com” delhi-DC01 delhi-DC02
Replicate an object with DistinguishedName ‘CN=AM,OU=AccountDeptOU,DC=delhi,DC=TOSSolution,DC=com’ from delhi-DC01 to delhi-DC02.

————————– EXAMPLE 2 ————————–
C:\PS>Get-ADUser RaviS| Sync-ADObject -Destination “Delhi-RODC01” -PasswordOnly
Pre-cache the password of Ravi Sto the read-only Domain Controller Delhi-RODC01 using the user’s SamAccountName

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

Get-Command Sync-ADObject

Get-Command Sync-ADObject powershell script command cmdlet

You can also read about
. Get-ADObject
. Move-ADObject
. New-ADObject
. Remove-ADObject
. Rename-ADObject
. Restore-ADObject
. Set-ADObject

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 *