Audience Compilation Status is ‘Compiling’ for a long time

Looking at Central Administration console under Manage Profile Service we have noticed that Audience Compilation Status shows ‘Compiling’ for a long time. There is no errors in the event logs. Attempts to stop compilation or compile an individual audience did not produce any results.

There is AudienceJob.exe executable that you can use to manipulate audiences:

AudienceJob.exe <Application Id> [Crawl Type] [Audience Name]
Application Id: Guid corresponding to UserProfile application
Command: 1 = Start, 0 = Stop
Crawl Type: 1 = Full, 0 = Incremental (default = 1)
Audience Name: Specific audience to compile (default = all)

####################################################################################################
#
#  Author.......: David Shvartsman
#  Date.........: 05/18/2018
#  Description..: Restart Audience Compilation
#
#################################################################################################### 
if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) {
    Add-PSSnapin "Microsoft.SharePoint.PowerShell"
}
$ServiceType = "User Profile Service Application"
$spService = Get-SPServiceApplication  | where {$_.TypeName -like $ServiceType }
$id = $spService.id
Audiencejob.exe $id 0 
Audiencejob.exe $id 1

You can use AudienceJob.exe to compile a specific audience.

It works in SharePoint 2010, SharePoint 2013 and SharePoint 2016.

That was another page in the Chronicles of SharePoint Bits, happy scripting!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.