Export (0) Print
Expand All
Expand Minimize

Sync-ADObject

Windows Server 2012 and Windows 8

Applies To: Windows Server 2012

Sync-ADObject

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

Syntax

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




Detailed 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<ADAuthType>

Specifies the authentication method to use. Possible values for this parameter include:

Negotiate or 0

Basic or 1

The default authentication method is Negotiate.

A Secure Sockets Layer (SSL) connection is required for the Basic authentication method.

The following example shows how to set this parameter to Basic.

-AuthType Basic


Aliases

none

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.

Type a user name, such as "User01" or "Domain01\User01", or enter a PSCredential object, such as one generated by the Get-Credential cmdlet. If you type a user name, you will be prompted for a password.

This parameter is not supported by any providers installed with Windows PowerShell.


Aliases

none

Required?

false

Position?

named

Default Value

none

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. The alias for Destination is Server. 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.

Valid formats for specifying the destination server are the following:

Host name

Example: corp-DC12

Host name and port

Examples: corp-DC12:3268

Fully qualified directory server name and port

Example: corp-DC12.corp.contoso.com:3268

IP address

Examples: 10.0.0.1

IP address and port

Example: 10.0.0.1:3268


Aliases

Server

Required?

true

Position?

3

Default Value

none

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.

Distinguished Name

Example: CN=saradavis,OU=users,OU=asia,DC=corp,DC=contoso,DC=com

GUID (objectGUID)

Example: 599c3d2e-f72d-4d20-8a88-030d99495f20

The cmdlet searches the default naming context or partition to find the object. If two or more objects are found, the cmdlet returns a non-terminating error.

This parameter can also get this object through the pipeline or you can set this parameter to an object instance.

Derived types, such as the following are also accepted:

Microsoft.ActiveDirectory.Management.ADGroup

Microsoft.ActiveDirectory.Management.ADUser

Microsoft.ActiveDirectory.Management.ADComputer

Microsoft.ActiveDirectory.Management.ADServiceAccount

Microsoft.ActiveDirectory.Management.ADFineGrainedPasswordPolicy

Microsoft.ActiveDirectory.Management.ADDomain

This example shows how to set this parameter to an ADObject object instance named "ADObjectInstance".

-Identity $ADObjectInstance


Aliases

none

Required?

true

Position?

1

Default Value

None

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-PassThru

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.


Aliases

none

Required?

false

Position?

named

Default Value

False

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PasswordOnly

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.


Aliases

none

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.

Valid format foes specifying the source server are the following:

Host name

Example: corp-DC12

Host name and port

Examples: corp-DC12:3268

Fully qualified directory server name and port

Example: corp-DC12.corp.contoso.com:3268

IP address

Examples: 10.0.0.1

IP address and port

Example: 10.0.0.1:3268


Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • Microsoft.ActiveDirectory.Management.ADObject

    Derived types, such as the following are also accepted:

    Microsoft.ActiveDirectory.Management.ADGroup

    Microsoft.ActiveDirectory.Management.ADUser

    Microsoft.ActiveDirectory.Management.ADComputer

    Microsoft.ActiveDirectory.Management.ADServiceAccount

    Microsoft.ActiveDirectory.Management.ADOrganizationalUnit

    Microsoft.ActiveDirectory.Management.ADFineGrainedPasswordPolicy

    Microsoft.ActiveDirectory.Management.ADDomain


Outputs

The output type is the type of the objects that the cmdlet emits.

Notes

  • This cmdlet only works with Windows Server 2012, Windows Server 2008 R2 SP1 and Windows Server 2008 or  Windows Server 2003.

  • For Windows Server 2008 or Windows Server 2003, this cmdlet requires that the Active Directory Management Gateway Service is installed and running. This requires a separate download, which can be obtained on the Microsoft Download Center.

Examples

-------------------------- EXAMPLE 1 --------------------------

Description

-----------

Replicate an object with DistinguishedName 'CN=AccountManagers,OU=AccountDeptOU,DC=corp,DC=contoso,DC=com' from corp-DC01 to corp-DC02.


C:\PS>Sync-ADObject "CN=AccountManagers,OU=AccountDeptOU,DC=corp,DC=contoso,DC=com" corp-DC01 corp-DC02

-------------------------- EXAMPLE 2 --------------------------

Description

-----------

Pre-cache the password of Sara Davis to the read-only Domain Controller corp-RODC01 using the user's SamAccountName


C:\PS>Get-ADUser saradavis | Sync-ADObject -Destination "corp-RODC01" -PasswordOnly

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft