• home
    • news & events
    • blog
  • über uns
    • projekte und referenzen
    • partner
    • produkte & technologien
    • offene jobs / stellen
    • veröffentlichungen
  • dienstleistungen & services
    • software design & architektur
    • software entwicklung
    • beratung / consulting
    • training, kurse und workshops
  • angebote
    • quick-starts
    • trainings und kurse
    • modulare sharepoint 2010 workshops
  • kontakt
"Wir sprechen SharePoint."
In Code und Klartext.
Seit über 100 Jahren.
Diesen Blog abonnieren
Subscribe in NewsGator Online Add to My AOL
Add to Google Reader or Homepage Add to netvibes

Aktuelle Posts

Ribbon Designer für SharePoint und Office365
Mapping Boolean Properties in a Custom Nintex Workflow Action
SharePoint Designer, Literals und das __designer:Preview Ärgernis
Spellcheck: Anpassen (Customizing) des Content Editors
Access Services - the Big Picture

Archiv

Mai 2012 (1)
April 2012 (5)
März 2012 (5)
Februar 2012 (7)
Januar 2012 (4)
Dezember 2011 (2)
November 2011 (10)
September 2011 (3)
August 2011 (7)
Juli 2011 (1)
Juni 2011 (3)
Mai 2011 (6)
April 2011 (5)
März 2011 (8)
Februar 2011 (8)
Januar 2011 (4)
Dezember 2010 (5)
November 2010 (7)
September 2010 (6)
August 2010 (2)
Juli 2010 (11)
Juni 2010 (13)
Mai 2010 (11)
April 2010 (4)
März 2010 (6)
Februar 2010 (2)
Januar 2010 (6)
Dezember 2009 (4)
November 2009 (13)
Oktober 2009 (17)
September 2009 (2)
Juli 2009 (2)
März 2009 (2)
Januar 2009 (1)

1stQuad ist Microsoft Certified Gold Partner und bietet SharePoint und .NET Produkt- und Projekt-Kompetenz, -Erfahrung und -Know-How für Entwicklung, Architektur, Beratung, Schulung, Training und Kurse in Schweiz sowie Deutschland und Östereich.
1stQuad ist MatchPoint Partner und bietet MatchPoint Produkt- und Projekt-Kompetenz, -Erfahrung und -Know-How für Entwicklung, Architektur, Beratung, Schulung, Training und Kurse in Schweiz sowie Deutschland und Östereich.
1stQuad ist Nintex Partner und bietet Nintext SharePoint Workflows Produkt- und Projekt-Kompetenz, -Erfahrung und -Know-How für Entwicklung, Architektur, Beratung, Schulung, Training und Kurse in Schweiz sowie Deutschland und Östereich.
1stQuad ist Balesio Gold Partner und bietet SharePoint FILEMinimizer Produkt- und Projekt-Kompetenz, -Erfahrung und -Know-How für Entwicklung, Architektur, Beratung, Schulung, Training und Kurse in Schweiz sowie Deutschland und Östereich.
1stQuad Solutions ist Kentico Certified Solution Partner und bietet Produkt- und Projekt-Kompetenz, -Erfahrung und -Know-How für Entwicklung, Architektur, Beratung, Schulung, Training und Kurse in Schweiz sowie Deutschland und Östereich.
© 2011 1stQuad Solutions
Alle Rechte vorbehalten
> Impressum
Wir bieten Microsoft SharePoint und .NET Projekt- und Produkt-Know-how, Kompetenz und Erfahrung für Entwicklung, Architektur, Beratung, Schulung, Training und Kurse in Zürich, Bern, Basel, Schweiz sowie Deutschland und Östereich.

Blog > Juni 2010

Tips'n'Tricks: SharePoint 2010 User Profile Synchronisation einrichten

Das Einrichten des SharePoint 2010 User Profile Syhchronisation ist nicht ganz einfach, denn die Synchronisation hängt von sehr vielen Services und Berechtigungen ab. Dieser Beitrag zeigt auf welche Probleme ich gestossen bin und wie man diesen (möglichst von Anfang an) gleich vorbeugen kann.

Veröffentlicht am 22.06.2010 11:03:06 von Michael Hofer mit 1 Kommentar(en)

)Wie immer richte ich alle Services in meiner SharePoint 2010 Farm mit PowerShell Scripts ein. Die UserProfile-Service Applikation ist sehr schnell eingerichtet, mit der Synchronisation hingegen hat man so einiges zu beachten.

Die beste Basis für den Start ist sicherlich folgende TechNet Seite: http://technet.microsoft.com/en-us/library/ee721049.aspx.

Wichtig ist vor allem folgendes: Das SharePoint-Farm Account muss zwingend auf dem SharePoint-Server, auf dem die User Profile Synchronization eingerichtet wird

  • Miglied der Gruppe der lokalen Administratoren sein (Domänen-Admin etc. reicht nicht aus! )
  • sich lokal anmelden können.
Leider hat Microsoft diese Anforderungen an das Farm-Account nicht auf der entsprechenden TechNet Seite aufgenommen. Wenn Sie diese Änderungen also erst nach der Farm-Installation einrichten müssen Sie den Server neu starten oder zumindest den SharePoint Timer Service neu starten.

Nun hat sich für mich folgendes Vorgehen als reproduzierbar zum Erfolg führend herausgestellt:
  • Mit dem Farm-Account lokal auf dem Server einloggen, auf dem die Synchronisation zum Laufen gebracht werden soll.
  • User Profile Service Application und -Proxy mittels PowerShell Script erstellen.
  • Firewall konfigurieren (siehe unten)
  • User Profile Synchronisation starten.
Nach dem Starten kann man im EventLog verfolgen, ob etwas schief läuft. Doch Achtung: ab und an (ich konnte die Logik nicht nachvollziehen) erscheinen Fehlermeldungen - obwohl der Service sauber startet. Dieser Vorgang kann bis zu 10 Minuten in Anspruch nehmen, erst dann wird man in der Central Adminsitration erlöst und der User Profile Synchronisation Service wird als "Started" angezeigt.

Zu Guter letzt scheitert das Starten des Synchronisations-Service oft an der Firewall der Datenbank-Server. Ich habe bis heute noch nicht genau herausgefunden, welche Ports genau geöffnet werden müssen, die Dokumentation von Microsoft gibt für SharePoint Datenbank-Server hierfür leider auch keinen Aufschluss (siehe http://technet.microsoft.com/de-de/library/cc262849.aspx). Ich weiss nur, dass der Distributed Transaction Coordinator (DTC) in der Kommunikation zwischen Datenbank-Server und Synchronisations-Server benötigt wird. Die vom DTC verwendeten Ports respektive die DTC Applikation müssen auf jeden Fall auf beiden Servern freigeschaltet werden (siehe http://technet.microsoft.com/en-us/library/cc753510(WS.10).aspx)

So, nun sollte der SharePoint 2010 User Profile Service Synchronisation ohne weitere Probleme installiert und gestartet werden können - Viel Glück!

Ach ja - nach der erfolgreichen Installation der Synchronisation können dem Farm-Account die lokalen Administrations-Rechte wieder entzogen werden.

UPDATE vom 08.07.2010:

Der Inhalt dieses Beitrags hat sich in der Zeit einige Male geändert - kein Wunder, die erfolgreiche Installation der User Profile Synchronisation ist ganz schön anspruchsvoll. Damit Ihr es vielleicht ein bisschen einfacher habt, veröffentliche ich hier noch mein PowerShell-Script. welches sich in der Praxis nun doch schon einige Male bewährt hat:

## Read Me: Before executing this script, the MySite Web Application must have been created and the needed DNS entries must have been done!

## Settings you may want to change ##
# Service
$serviceAppName = "User Profile Service Application"
$serviceAppProxyName = "User Profile Service Application Proxy"
$serviceTypeName = "User Profile Service Application"

# ApplicationPool
$appPoolName = "SharePoint Hosted Services"
$appPoolServiceAccount = "?????????????????"
$appPoolServiceAccountPasword = (ConvertTo-SecureString "
????????????????? " -AsPlainText -force)   
$appPoolServiceAccountCredential = New-Object System.Management.Automation.PSCredential ($appPoolServiceAccount, $appPoolServiceAccountPasword)

# Database
$dbServer = "SHAREPOINT_SP1_T_Services"
$profilDbeName = "SHAREPOINT_SP1_T_SRV_USER_Profile"
$syncDbName = "SHAREPOINT_SP1_T_SRV_USER_Sync"
$sociaDblName = "SHAREPOINT_SP1_T_SRV_USER_Social"

# Mysite
$mySiteUrl = "http:/
????????????????? "
$mySitePort = 80

# User Profile Synchronization
$farmAccount = "
????????????????? "
$farmAccountPassword = "
????????????????? "
$machine = [System.Environment]::MachineName

Add-PSSnapIn Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#region install
try
{
    Write-host "Starting to create the user profiles service"

    # Ensure Service Account
    Write-Host "[1 of 6] Verify managed account $appPoolServiceAccount"
    $managedAccount = Get-SPManagedAccount | Where-Object {$_.UserName -eq $appPoolServiceAccount}
    If ($managedAccount -eq $NULL)
    {
        $managedAccount = New-SPManagedAccount -Credential $appPoolServiceAccountCredential
        if (-not $?) { throw "Failed to create managed account" }
    }
    Else {Write-Host -ForegroundColor blue "- Managed account $appPoolServiceAccount already exists, continue..."}


    #App Pool
    Write-Host "[2 of 6] Verify application pool $appPoolName"
    $applicationPool = Get-SPServiceApplicationPool $appPoolName -ea SilentlyContinue
    if($applicationPool -eq $null)
    {
        $applicationPool = New-SPServiceApplicationPool $appPoolName -account $appPoolServiceAccount
        if (-not $?) { throw "Failed to create an application pool" }
    }
    Else {Write-Host -ForegroundColor blue "- Application pool $appPoolName already exists, continue..."}


    ## get the service instance
    $profileServiceInstance = (Get-SPServiceInstance |?{$_.TypeName -eq "User Profile Service"})
    If (-not $?) { throw " - Failed to find User Profile Service instance" }

    ## Start Service instance
    Write-Host "[3 of 6] Starting User Profile Service instance..."
    If (($profileServiceInstance.Status -eq "Disabled") -or ($profileServiceInstance.Status -ne "Online"))
    { 
        $profileServiceInstance | Start-SPServiceInstance | Out-Null
        If (-not $?) { throw " - Failed to start User Profile Service instance" }

        ## Wait
        Write-Host " - Waiting for User Profile Service to provision" -NoNewline
        While ($profileServiceInstance.Status -ne "Online")
        {
            Write-Host "." -NoNewline
            sleep 10
            $profileServiceInstance = (Get-SPServiceInstance |?{$_.TypeName -eq "User Profile Service"})
        }
        Write-Host "Started!"
   }
   
    ## Create Service App
    Write-Host "[4 of 6] Creating $serviceAppName"
       $profileServiceApp  = New-SPProfileServiceApplication -Name $serviceAppName -ApplicationPool $applicationPool -ProfileDBName $profilDbeName -ProfileDBServer $dbServer -ProfileSyncDBName $syncDbName -ProfileSyncDBServer $dbServer -SocialDBName $sociaDblName -SocialDBServer $dbServer -MySiteHostLocation "$mySiteUrl`:$mySitePort"
       If (-not $?) { throw " - Failed to create $serviceAppName" }

    ## Create Proxy
    Write-Host "[5 of 6] Creating $serviceAppProxyName..."
    $profileServiceAppProxy  = New-SPProfileServiceApplicationProxy -Name $serviceAppProxyName -ServiceApplication $profileServiceApp -DefaultProxyGroup
    If (-not $?) { throw " - Failed to create $serviceAppProxyName" }
   
    ## Set the security (admin)
    Write-Host "[6 of 6] Configuring the security"
    $serviceapp = Get-spServiceApplication | ?{$_.TypeName -eq "User Profile Service Application"}
    $security = Get-SPServiceApplicationSecurity $serviceapp -Admin
    $appPoolAcctPrincipal = New-SPClaimsPrincipal -Identity $appPoolServiceAccount -IdentityType WindowsSamAccountName
    $farmAcctPrincipal =  New-SPClaimsPrincipal -Identity $farmAccount -IdentityType WindowsSamAccountName

    ## Give Full Control permissions to the claims principal you just created, and the Farm Account
    Grant-SPObjectSecurity $security -Principal $appPoolAcctPrincipal -Rights "Full Control"
    Grant-SPObjectSecurity $security -Principal $farmAcctPrincipal -Rights "Full Control"
    Set-SPServiceApplicationSecurity $serviceapp -ObjectSecurity $security -Admin

    Write-host "Done creating the user profiles service"
   
    ############################################# User Profile Synchronization #####################################################3
   
    Write-Host "[1 of 1] Starting the user profile synchronization service"
   
    $profileServiceApp  = Get-SPServiceApplication -Name $serviceAppName
   
     ## Get ID of User Profile Synchronization Service
    $profileSyncService = Get-SPServiceInstance |?{$_.TypeName -eq "User Profile Synchronization Service"}
    $profileSyncServiceID = $profileSyncService.Id

    ## Start Profile Synchronization Service

    $syncService = Get-SPServiceInstance | ? {$_.typeName -like "User Profile Synchronization Service" -And $_.Server.Address -like $machine}
    if ($syncService -eq $null)
    {
        throw "Cannot get user profile synchronization service instance."
    }

    if ($syncService.Status -eq "Online")
    {
        Write-Warning "The profile synchronization service is already running. Starting it again"
    }

    $profileServiceApp.SetSynchronizationMachine($machine, $syncService.Id, $farmAccount, $farmAccountPassword)

    Start-SPServiceInstance $profileSyncServiceID | Out-Null

    Write-host "Done creating the user profiles sync service"
  
}
catch
{
    Write-Host -ForegroundColor Red "ERROR:"
    Write-Output $_
}
#endregion


Übrigens: Für die Planung und PowerShell-Script-basierten Installation einer 2-Tier Small SharePoint 2010 Server Farm (Front-End/Application Server + SQL Server) bieten wir nun ein Quick-Start Angebot zum Fixpreis. Hier geht's zur Angebotsübersicht.

Kommentar
Max Melcher
Hi,

da ist nen Fehler im Script:

"$mySiteUrl`:$mySitePort"
If (-not $?) { throw " - Failed to create $serviceAppName" }

das ` sorgt zumindest bei mir für nen Error.
15.02.2011 16:13:22

Kommentar hinterlassen



 Security code
Zurück, Seite drucken