718 Washington Ave. N. Suite #101
Minneapolis, MN 55401
View map and all Locations

Send us a message

When a user “follows” a CRM record, they are able to see posts about that record on their personal wall. This wall contains posts about the records the user is following, posts regarding the user themselves, or posts that mention the user. Today’s blog describes how you can increase the activity feed follow limit per user for a CRM on-premises deployment using Windows PowerShell. Let’s get started!


The maximum number of records a user is allowed to follow is 5,000. However, that number is set to 1,000 by default. This value is configurable and can be changed by an administrator or a user with the permissions to modify CRM deployment settings. A list of other deployment settings is provided here: https://msdn.microsoft.com/en-us/library/hh547394.aspx.

Windows PowerShell enables you to easily run deployment commands to change the configuration of your CRM on-premises deployment, such as tasks that can be performed by using the Deployment Manager user interface and more. You can also use the methods that are described in the Microsoft Dynamics CRM SDK to perform these tasks. The PowerShell cmdlets are installed on your computer when you install a Full Server role or when you install the Deployment Tools server role if you’re installing individual server roles. To execute commands, you must first register the Microsoft Dynamics CRM commands with PowerShell.

If your CRM organization requires that users be able follow more than 1,000 records:

1. Create the following PowerShell script to update the advanced setting called ActivityFeedFollowLimit.



#optional params

[string]$ConfigurationEntityName =“Deployment”,

[string]$SettingName =“ActivityFeedFollowLimit”,

[object]$SettingValue =“5000”,



$RemoveSnapInWhenDone = $False

if (-not (Get-PSSnapin -Name Microsoft.Crm.PowerShell -ErrorAction SilentlyContinue))


Add-PSSnapin Microsoft.Crm.PowerShell

$RemoveSnapInWhenDone = $True


$setting = New-Object “Microsoft.Xrm.Sdk.Deployment.ConfigurationEntity”

$setting.LogicalName = $ConfigurationEntityName

if($Id) { $setting.Id = $Id }

$setting.Attributes = New-Object “Microsoft.Xrm.Sdk.Deployment.AttributeCollection”

$keypair = New-Object “System.Collections.Generic.KeyValuePair[String, Object]” ($SettingName, $SettingValue)


Set-CrmAdvancedSetting -Entity $setting



Remove-PSSnapin Microsoft.Crm.PowerShell


2. Save the script as a Windows PowerShell cmdlet File (for example, SetActivityFeedFollowLimit.ps1).

3. Execute the cmdlet file as follows:

a. Log on to the administrator account in your Microsoft Dynamics CRM server.

b. Open a PowerShell command prompt.

c. Enter the following command:

Add-PSSnapin Microsoft.Crm.PowerShell

Note: This command adds the Dynamics CRM PowerShell snap-in to the current session. The snap-in is registered during installation and setup of the Microsoft Dynamics CRM server.

d. Enter the following command pointing to the file location of the previously created cmdlet:


Sample code for setting writable values in advanced settings tables can be found here.

Please note that updating the ActivityFeedFollowLimit setting will adjust the value for all CRM organizations hosted on a set of CRM servers. Additionally, this value can only be updated via PowerShell for CRM on-premises customers.

That’s all for today readers! We hope you found today’s tutorial useful. Interested in learning more? Check out our CRM Book, where you can access information regarding anything and everything CRM!

Until next time, happy CRM’ing!

Avatar for JoeCRM


Joe CRM is a CRM superhero who runs on pure Microsoft Dynamics CRM adrenaline. As the face of PowerObjects, Joe CRM’s mission is to reveal innovative ways to use Dynamics CRM and bring the application to more businesses and organizations around the world.