Reading Time: < 1 minutes
Bonjour à tous,
Si comme moi vous avez déjà eu le petit problème sur le User Profile Synchronization Service bloqué sur « starting » voici une petite méthode bien sympathique 🙂
Faites un fichier de script powershell .ps1 et copiez coller ceci:
Add-PSSnapin Microsoft.SharePoint.Powershell # these will only work if there is one DB and one SA on the box. # If more than one, then use Get-SPDatabase and Get-SPServiceApplication # to grab the GUID and pass that in instead of the pipebind $syncDBType = "Microsoft.Office.Server.Administration.SynchronizationDatabase" $upaSAType = "User Profile Service Application" $syncDB = Get-SPDatabase | where-object {$_.Type -eq $syncDBType} $upa = Get-SPServiceApplication | where-object {$_.TypeName -eq $upaSAType} $syncDB.Unprovision() $syncDB.Status = "Offline" $upa.ResetSynchronizationMachine() $upa.ResetSynchronizationDatabase() $syncDB.Provision() # we MUST restart the timer service for the state to be reflected in # Services on Server and Manage UPA restart-service SPTimerV4 # at this stage we MUST add the Farm account to the SyncDB (the above # steps remove the user) remember the default schema must be 'dbo'. # If we don't do this, UPS provisioning will fail.
Ensuite ouvrez votre console Sharepoint management powershell et exécutez ce script, si vous avez une erreur au lancement du script, n’oubliez pas de faire un Set-ExecutionPolicy RemoteSigned
Une fois lâexécution terminée, faites un refresh de votre administration centrale et votre service est maintenant sur stopped 🙂
Sharepointez bien 😉