Saturday, August 27, 2016

Create User Profile Synchronization Connection in SharePoint 2016 using PowerShell

User Profile Service Synchronization Connection in SharePoint specifies the source for importing user profiles from Active Directory or any other profile source. The user profile import operation is unidirectional in SharePoint 2016 (from Active Directory to SharePoint) which populates user profile data in user profile service application from Active Directory.

How to Create user profile synchronization connection for SharePoint using PowerShell?
As in previous versions of SharePoint,  An import connection can be created the user Profile service Application. To add new synchronization connection in SharePoint 2016:

  • Go to SharePoint 2016 Central Administration >> Application Management 
  • Manage Service applications >> select User Profile Service application 
  • On User profile service application page, click on "Configure Synchronization Connections" >> Create New Connection
    create user profile synchronization connection powershell
  • Fill in the details according to your environment. Such as:
    • Connection Name, The Fully Qualified Domain Name, Authentication Provider Type
    • The user account and password of the account that will retrieve the user profile information.
    • The TCP Port (defaults to 389, for LDAP). whether to use an SSL-secured connection, Filter out disabled users, and another option for Filtering in the LDAP syntax.
    • Click on Populate Containers and Select which container in Active Directory is to be synchronized in this connection.
PowerShell Script to create user profile synchronization connection:
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Configuration Parameters
$ImportDomain = "Crescent"
$ImportPassword = Read-host "Enter the Password for Import Account:" -AsSecureString 
$ServiceAppName="User Profile Service Application"
$FilterDisabledUsers = $True
#Get User Profile Service application
$UPS=Get-SPServiceApplication -Name $ServiceAppName

#Create User Profile Synchronization Connections 
Add-SPProfileSyncConnection -ProfileServiceApplication $UPS -ConnectionForestName $ForestName -ConnectionDomain $ImportDomain -ConnectionUserName $ImportUserName -ConnectionPassword $ImportPassword -ConnectionSynchronizationOU $ImportOU -ConnectionUseDisabledFilter $FilterDisabledUsers

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.

Check out these SharePoint products:

No comments :

Post a Comment

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...