Only the OU setting is removed when you run the Remove-SPProfileSyncConnection cmdlet in SharePoint Server 2013

Article translations Article translations
Article ID: 2758430 - View products that this article applies to.
Expand all | Collapse all

Symptoms

Consider the following scenario:
  • You enable the SharePoint Active Directory Import option for the User Profile Service Application in Microsoft SharePoint 2013. To do this, you use SharePoint Central Administration or SharePoint Management Shell.
  • You create a profile synchronization connection by using the Add-SPProfileSyncConnection cmdlet.
  • You try to remove the profile synchronization connection by using the Remove-SPProfileSyncConnection cmdlet.
In this scenario, the profile synchronization connection is not removed correctly. Specifically, the Remove-SPProfileSyncConnection cmdlet only removes the organizational unit (OU) setting from the profile synchronization connection.

Resolution

To remove the profile synchronization connection, run the following script:
$ctx=Get-SPServiceContext -Site <Site in the SharePoint Farm>
$UPCM=New-Object Microsoft.Office.Server.UserProfiles.UserProfileConfigManager $ctx
$UPCM.ConnectionManager|% Delete

More information

For more information about the Add-SPProfileSyncConnection cmdlet, go to the following Microsoft website:
General information about the Add-SPProfileSyncConnection cmdlet
For more information about the Remove-SPProfileSyncConnection cmdlet, go to the following Microsoft website:
General information about the Remove-SPProfileSyncConnection cmdlet

Properties

Article ID: 2758430 - Last Review: December 9, 2013 - Revision: 2.0
Applies to
  • Microsoft SharePoint Server 2013
Keywords: 
kbsurveynew kbtshoot kbexpertiseinter KB2758430

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com