How To Compile The Uncompiled Audiences In User Profile Service Application

If you are using Target Audience in your SharePoint environments, there is a possibility that Target Audience is not working in the Site Collections.

You need to check the Uncompiled Audience in the User Profile Service Application and compile it, if the value is greater than zero.

Please follow the steps given below to compile the Uncompiled Audiences.

Step 1 Run PS commands given below.

$objrunjob=[Microsoft.Office.Server.Audience.AudienceJob]::RunAudienceJob($args);

Output

AudienceJob.exe <Application Id> <Command> [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)

Application Id for User Profile Service Application: 6d6g494-6f4s-644c-9g4b-5438573491f

Step 2

The command given above will give me the "Application ID" for the User profile Service Application and afterwards, you will run the command given below to stop the audience compiling. Please wait until the audience compiling is idle.

Note

If the audience compilation status is already idle, then skip this step.

Application ID: 6d6g494-6f4s-644c-9g4b-5438573491f

Audiencejob.exe <Application ID> 0

Step 3

Run the command given below to start the audience compiling. Once it is started, it will compile the uncompiled users.

Audiencejob.exe <Application ID> 1

Step 4

Please verify the Uncompiled Audience value and it should be zero.

I hope it helps.