Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Running SetAdvancedSettings.sp1 issues

Posted on by Microsoft Employee

Hi,

We have Dynamic CRM 365 (Version 1612 (8.2.2.112) (DB 8.2.2.112) on-premises). We are trying to set the Session and Inactive timeouts, however the option in the 

System Settings > General > Session & Inactive timeout don't exist. So we are trying to enable them through the command below 

Run SetAdvancedSettings.ps1 -ConfigurationEntityName ServerSettings -SettingName AllowCustomSessionDuration -SettingValue true -Id.......

Source: https://technet.microsoft.com/en-us/library/mt825191.aspx

However, it throws the error below:

SetAdvancedSettings.ps1 : The term 'SetAdvancedSettings.ps1' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
correct and try again.
At line:1 char:1
+ SetAdvancedSettings.ps1 -ConfigurationEntityName ServerSettings -SettingName All ...
+ ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (SetAdvancedSettings.ps1:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

If we run the same command with (./) in the begging we get the error below

Set-CrmAdvancedSetting : Source    : mscorlib
Method    : HandleReturnMessage
Date    : 7:33:44 AM
Time    : 5/31/2018
Error    : Message: The Deployment Service cannot process the request because one or more validation checks failed.
ErrorCode: -2147167645
Stack Trace    :
======================================================================================================================
Inner Exception Level 1    :
==DeploymentServiceFault Info==========================================================================================
Error    : The Deployment Service cannot process the request because one or more validation checks failed.
Time    : 5/31/2018 11:33:44 AM
ErrorCode    : -2147167645
Date    : 7:33:44 AM
Time    : 5/31/2018
Error Items:
    VerifyAllSpecifiedAtributesAreWritable raising error : One or more of the specified attributes are not valid for
update:  AllowCustomInactivityDuration
======================================================================================================================
At C:\Users\AAlWaqfi\Downloads\SDK\SampleCode\ps\SetAdvancedSettings.ps1:26 char:1
+ Set-CrmAdvancedSetting -Entity $setting
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (Microsoft.Crm.P...AdvancedSetting:SetCrmAdvancedSetting) [Set-CrmAdvancedS
   etting], FaultException`1
    + FullyQualifiedErrorId : CRM Deployment Cmdlet Error,Microsoft.Crm.PowerShell.SetCrmAdvancedSetting

Command Line tool used: Powershell (Admin)

We are executing the command under: C:\Users\accountName\Downloads\SDK\SampleCode\ps

Any idea what is wrong? or how we can enable the Set Session timeout out and Set Inactive timeout sections?

*This post is locked for comments

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans