Working with CrmSettings via PS – setting things you didn’t know you could, or should

Working with CrmSettings via PS – setting things you didn’t know you could, or should

Recently I have been trying to fix some Server Side Sync issues with an on-prem Dyn CRM 2016 and this got me to dig into the nitty gritty of settings for the system.

Before going berserk and chaning a lot of these settings, be aware that you can cause severe problems with your system if you are not careful so I would strongly recommend that you test any settings and also export any settings so that you know what they are.

Finetuning your onprem installation is something that you can do with an onprem that is a lot harder with online.

By logging in on your CRM-server, and opening Powershell and entering the following command, you can start working with some settings that are otherwise hard or impossible to reach:

Add-PSSnapin Microsoft.Crm.PowerShell

For instance, if you want to check out some of the ServerSideSync Settings, enter:

Get-CrmSetting -SettingType ServerSideSyncQueueSettings

If you are using the Windows Power Shell ISE, after loading the Microsoft.Crm.PowerShell, you will get intellisense that will help you see which different settings are available. So if you write:

Get-CrmSetting -SettingType

And then enter a space after this, you will see the different options:

For some more details into Server side sync and how to configure this in detail, look here:
https://download.microsoft.com/download/7/1/D/71D44C6E-CB78-4573-BDFF-77A6E137BA5C/serversidesyncwithDynamicsCRM.pdf

And here is an example of how to set data.

$set = Get-CrmSetting -SettingType ServerSideSyncQueueSettings 

$set.MailboxQueueItemsInMemoryHigh = “500” 
$set.MailboxQueueItemsInMemoryLow = “200” 

Set-CrmSetting -Setting $set

Just add more $set – statements to set more values.

If you want to write some settings to a file, just pipe the output to a file, for example:

Get-CrmSetting -SettingType ServerSideSyncQueueSettings > ServerSideSyncSettingsOrg.txt

But as I mentioned above, be careful with these settings.

Gustaf Westerlund
MVP, Founder and Principal Consultant at CRM-konsulterna AB
www.crmkonsulterna.se

Extending Max amount of components on dashboards only for onprem

Extending Max amount of components on dashboards only for onprem

Some of you might have found some sites like this https://msdynamicscrmblog.wordpress.com/2014/05/23/how-to-change-the-dashboardsettings-of-maximum-controls-limit-in-dynamics-crm20112013/
one:

I, Soupeurfaive, via Wikimedia Commons

or even the original MSDN or Technet sites regarding how to be able to change the maximum amount of components on a dashboard from the maximum of 6 to for instance 8 using PowerShell.

On the MSDN and Technet pages there are some default CRM version text in the header and footer but make no misstake, you can only do this change in a CRM onprem environment where you are the deployment admin.

As the change is deployment wide and you need to have deployment administrator access rights, you are also extremely unlikely (unless you have a dedicated Online environment) to get that set.

Gustaf Westerlund
MVP, Founder and CTO at CRM-konsulterna AB
www.crmkonsulterna.se