SharePoint 2019 - Active Directory Import Not Importing

Amanda Berry 0 Reputation points
2025-01-17T12:31:37.6466667+00:00

Currently User Profile Service Application is stuck on starting. User's image

User's image

When I view the job history I found this failed:
User's image

When I try to manually start the User Profile Service Application it goes to Provisioning.
When I check the services running on the farm it shows this:
User's image

Clicking on Fix does not resolve the issue, it just stops the User Profile Service App altogether.

In the Event Viewer I am seeing the following errors every day, multiple times a day:
User's image

User's image

I'm not sure where to go from here. Any help would be greatly appreciated!

Microsoft 365 and Office | SharePoint Server | For business
Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,496 Reputation points Microsoft External Staff
    2025-01-20T02:24:46.1433333+00:00

    Hi @Amanda Berry,

    Try running this Powershell script as an Administrator on your computer. It will attempt to correct the issues for you.

    Remove-SPDistributedCacheServiceInstance
    
    #first Delete
    $SPFarm = Get-SPFarm
    $cacheClusterName = "SPDistributedCacheCluster_" + $SPFarm.Id.ToString()
    $cacheClusterManager = [Microsoft.SharePoint.DistributedCaching.Utilities.SPDistributedCacheClusterInfoManager]::Local
    $cacheClusterInfo = $cacheClusterManager.GetSPDistributedCacheClusterInfo($cacheClusterName);
    $instanceName ="SPDistributedCacheService Name=AppFabricCachingService"
    $serviceInstance = Get-SPServiceInstance | ? {($_.Service.Tostring()) -eq $instanceName -and ($_.Server.Name) -eq $env:computername}
    if([System.String]::IsNullOrEmpty($cacheClusterInfo.CacheHostsInfoCollection))
    {
    $serviceInstance.Delete()
    }
    
    #then create new
    
    $SPFarm = Get-SPFarm
    $cacheClusterName = "SPDistributedCacheCluster_" + $SPFarm.Id.ToString()
    $cacheClusterManager = [Microsoft.SharePoint.DistributedCaching.Utilities.SPDistributedCacheClusterInfoManager]::Local
    $cacheClusterInfo = $cacheClusterManager.GetSPDistributedCacheClusterInfo($cacheClusterName);
    $instanceName ="SPDistributedCacheService Name=AppFabricCachingService"
    $serviceInstance = Get-SPServiceInstance | ? {($_.Service.Tostring()) -eq $instanceName -and ($_.Server.Name) -eq $env:computername}
    if([System.String]::IsNullOrEmpty($cacheClusterInfo.CacheHostsInfoCollection))
    {
    
    Add-SPDistributedCacheServiceInstance
    $cacheClusterInfo.CacheHostsInfoCollection
    }
    
    

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.