SharePoint Best Practices
Try SPDocKitContact Us
  • SharePoint Best Practices Library by SPDocKit
  • Configuration
    • App Configuration
      • App Services Configured
      • Apps Configured
    • Distributed Cache
      • Appfabric Patched
      • Cache Cluster State
      • Cache Running
      • SharePoint Distributed Cache Size 2013
      • Distributed Cache Collocation Compliance
    • Security
      • Farm Account is not Local Admin
      • Office Web Apps HTTPS
    • Solutions
      • Solution Assembly Deployment Valid
    • Servers
      • Expired Certificates
      • Loopback Disabled
      • Minrole Compliance
  • Databases
    • ModelDB
      • ModelDB Files Autogrowth
      • ModelDB Files Initial Size
      • ModelDB Recovery Model
    • TempDB
      • TempDB Files
      • TempDB Files Configuration
      • TempDB Recovery Model
      • TempDB Response Times
      • TempDB Size
    • Content Database Autogrowth
    • Content Database Capacity
    • Database Files
    • Disk Allocation Size
    • Max Degree of Parallelism
    • SQL Alias
    • SQL Server Memory – SQL Server Memory Allocation Best Practices
  • Hardware Requirements
    • Free Disk Space
    • SharePoint 2013 Server and Hardware Requirements
  • Maintenance
    • Backup
      • Content Database Backups
      • Farm Backup Configured
      • Farm Backup History
    • Misc
      • Farm Accounts Used Interactively
      • PDF iFilter Installed
      • Upgrade Ready
  • Monitoring and Logging
    • Diagnostic Log Path
    • Enable Usage and Health Data Collection
    • SharePoint IIS Log Path
    • Restrict Trace Log Disk Space Usage
    • Search Index Path
    • ULS Active
    • Usage and Health Log Path
    • Verbose Logging Enabled
  • Service Applications
    • Search
      • Crawl Account Search Permission
      • Incremental Search Configuration
      • PDF Extension Added to Search Application
      • Search Content Sources
      • Search Running
    • UPA
      • My Site Configured
      • UPA Up and Running
    • Web Analytics
      • Event Collection Configured
      • Web Analytics Services Started
    • Application Proxies
    • Authentication Providers
    • Exchange Task Sync
    • Multiple Service Applications
    • Sandboxed Code Service
    • SharePoint 2013 Secure Store Service Configured
    • State Service
  • SharePoint Software Boundaries and Limits
    • SharePoint Software Boundaries and Limits Overview
    • Limits by Feature
      • Search Limits
        • Authoritative Pages
        • Content Sources
        • Crawl Components
        • Crawl Databases
        • Crawl Rules
        • Index Partitions
        • Managed Properties
        • Property Databases
        • Scope Rules Count per Search Service Application
        • Scope Rules Count per Search Scope
        • Search Topology Limits
        • Sharepoint Search Service Applications
        • Start Addresses
      • User Profile Limits
        • User Profile Count
      • Visio Services Limits
        • File Size of Visio Web Drawings – Max Web Drawing Size
        • Visio Services Cache Age
        • Visio Web Drawing Recalculation Time-out
      • Word Automation Services
        • Conversion Job Size
        • Conversion Start Frequency
    • Limits by Hierarchy
      • Content Database Limits
        • Content Database Size
        • Number of Content Databases
        • Site Collections per Content Database
      • Server Limits
        • Number of Application Pools
      • Site Collection Limits
        • Number of Site Collections
        • Site Collection Size
        • Web Site
      • Web Application Limits
        • Content Databases
        • Managed Paths
        • Number of Web Applications
        • Site Collections
  • Site Collection Health
    • Farm Features Duplicate IDs
    • Features Duplicate IDs
    • SharePoint Site Collection Upgrade – Upgrade SharePoint 2010 to 2013
    • Site Collections Duplicate IDs
    • Web Application Features Duplicate IDs
  • Updates
    • SharePoint
      • Build Revoked
      • Farm in Trial
      • Is SharePoint Up to Date
      • SharePoint 2013 Language Packs Up to Date
      • Office Web Apps Up to Date - Office Web App Servers
      • Product Supported
    • Servers
      • Sharepoint Server Upgrade Required
      • Windows Updates
      • Hotfixes per Server Role
        • Application Servers Hotfixes
        • DB Servers Hotfixes
        • Distributed Cache Servers Hotfixes
        • Failover Servers Hotfixes
        • Search Servers Hotfixes
        • WFE Servers Hotfixes
  • Web Applications
    • Caching
      • BLOB Caching Enabled
      • Object Cache User Accounts
      • Publishing Cache
    • AppPool User in Performance Log Group
    • Batch Compilation Disabled
    • Web Application in Debug Mode - Web.config Debugging How To
    • Web Application URL Check
    • Web Applications Without Sites
    • SharePoint Web.config Files Equality
Powered by GitBook
On this page
  • Issue description
  • Explanation
  • Solution
  • Additional information

Was this helpful?

  1. Service Applications
  2. UPA

UPA Up and Running

UPA Up and Running best practices report by SPDocKit determines whether all user profile services are running in the farm.

PreviousMy Site ConfiguredNextWeb Analytics

Last updated 1 year ago

Was this helpful?

Issue description

This check determines whether all user profile services are running in the farm.

Explanation

The User Profile service is a shared service in SharePoint Server 2013 that enables the creation and administration of user profiles that can be accessed from multiple sites and farms. Using Profile Synchronization, SharePoint Server 2013 enables User Profile service administrators to synchronize user and group profile information stored in the SharePoint Server 2013 profile store with profile information stored in directory services and business systems across the enterprise.

Not running user profile services will result in non-functioning social features and SharePoint apps. It will also affect any third-party code that implements features depending on the SharePoint user profiles or SharePoint social features.

Solution

Make sure that all user profile services are running on one or more servers. Provisioning User Profile service on more than one server will ensure high service availability. Note that you can provision only one instance of User Profile Synchronization service.

To verify that the service application is created, please go to the Central Administration > Application Management > Manage service applications. To verify that the service instances are started and configured properly, go to Central Administration > Application Management > Manage services on server.

This script retrieves the health status of all User Profile Service Applications. It checks the following:

  • at least one User Profile Service Application is provisioned

  • all User Profile Service Applications have an User Profile Synchronization service instance provisioned

  • all User Profile Service Applications have at least one User Profile Service instance provisioned

  • status of the running profile synchronization jobs. If running longer than a defined threshold, it will display a warning message (default: 24h).

param(
    [int]$UPASyncRunningThreshold=24
)

Write-Host ""
Write-Host "Checking User Profile Service Applications... " -NoNewLine

$upaCol = Get-SPServiceApplication | where {$_.TypeName -eq "User Profile Service Application" }
$upasync = Get-SPServiceInstance | where {$_.TypeName -eq "User Profile Synchronization Service" -and $_.Status -eq "Online"}

if ($upaCol -ne $null)
{
    Write-Host "$($upaCol.Count) found!" -ForegroundColor Green
    Write-Host ""
    Write-Host "========================================================================="
    foreach ($upa in $upaCol)
    {
        Write-Host "User Profile Service Application: $($upa.DisplayName)"
        Write-Host "UPA Sync: " -NoNewLine
        if (($upasync | where {$_.UserProfileApplicationGuid -eq $upa.Id}) -eq $null)
        {
            Write-Host "not provisioned" -ForegroundColor Red
        }
        else
        {
            Write-Host "provisioned, healthy" -ForegroundColor Green
        }

        Write-Host "User Profile Service instances: " -NoNewLine

        $upasvcCount = [int]$($upa.ServiceInstances | where {$_.Status -eq "Online"}).Count
        switch ($upaSvcCount)
        {
            0 {Write-Host "none found" -ForegroundColor Red}
            1 {Write-Host "1 found. Consider deploying additional instance for high availability." -ForegroundColor Yellow}
            default {Write-Host "$upaSvcCount" -ForegroundColor Green}
        }

        Write-Host "Checking profile synchronization status: " -NoNewLine
        if ($upa.IsSynchronizationRunning)
        {
            # check if running for more hours than specified in the threshold
            Write-Host ""
            $upaTimerJob = Get-SPTimerJob | Where {$_.DisplayName -eq "$($upa.DisplayName) - User Profile Incremental Synchronization"}
            if ($upaTimerJob -eq $null)
            {
                Write-Host "Profile synchronization is running but the user profile synchronization timer job could not be found." -ForegroundColor Red
            }
            else
            {
                $runningTime = [datetime]::Now - ($upaTimerJob.SynchronizationStatus | where {$_.Stage -eq "StartSynchronization"}).BeginTime

                if ($runningTime.TotalHours -gt $UPASyncRunningThreshold)
                {
                    Write-Host "Running for more than $UPASyncRunningThreshold" -ForegroundColor Yellow
                    Write-Host "Running since $(($upaTimerJob.SynchronizationStatus | where {$_.Stage -eq "StartSynchronization"}).BeginTime) ($($runningTime.ToString()))." -ForegroundColor Yellow
                    Write-Host "You may consider checking the synchronization job." -ForegroundColor Yellow
                }
                else
                {
                    Write-Host "Running since $(($upaTimerJob.SynchronizationStatus | where {$_.Stage -eq "StartSynchronization"}).BeginTime) ($($runningTime.ToString()))." -ForegroundColor Green
                    # still green
                }
            }
        }
        else
        {
            Write-Host "idle" -ForegroundColor Green
        }
        Write-Host "========================================================================="
        Write-Host ""
    }
}
else
{
    Write-Host "None found!" -ForegroundColor Red
}

Additional information

Additional information can be found in the following TechNet articles:

Overview of the User Profile service application in SharePoint Server 2013
Create, edit, or delete User Profile service applications in SharePoint Server 2013
1KB
get-bpupastatus.7z
archive
Download this script
Download SPDocKit