Set-CrmSetting
Sets the specified Dynamics 365 deployment-wide settings.
Syntax
Set-CrmSetting
[-Setting] <DeploymentObject>
[-Timeout <Int32>]
[-Diag]
[-Credential <PSCredential>]
[-DwsServerUrl <String>]
[-WhatIf]
[-Confirm]
Description
The Set-CrmSetting cmdlet sets the specified Dynamics 365 deployment settings. The object is different based on the type of setting requested. These settings are used in this cmdlet to update configurations in a Dynamics 365 deployment. For the most current list of supported parameters, see Update deployment configuration settings.
Examples
Example 1
PS C:\> Get-CrmSetting -SettingType MonitoringSettings
PS C:\> $MonitoringData = Get-CrmSetting -SettingType MonitoringSettings
PS C:\> $MonitoringData.CertificateLifetimeNotificationThreshold = 10
PS C:\> Set-CrmSetting -Setting $MonitoringData
PS C:\> Get-CrmSetting -Setting MonitoringSettings
Displays the current monitoring settings, initializes the $MonitoringData object, sets the UpdateCertificateLifetimeNotificationThreshold to 10, and then displays the new monitoring setting.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Credential
Expects a variable that contains the user credentials used for signing in to Dynamics 365 on-premises organization. To establish this variable, run the PowerShell command $Cred = Get-Credential.
Type: | PSCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Diag
Turns on stack traces for error reports returned from Dynamics 365 service calls. Enabling this emits a detailed error message, including a stack trace, when an error is encountered by the Dynamics 365 PowerShell command.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DwsServerUrl
The URL of the Deployment Web Service. This should be in the format: https://, for example, https://contoso.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Setting
Specifies a DeploymentConfigSettings object containing the settings to update. The specified object must be one of the following types: AsyncSettings, ClaimsSettings, DashboardSettings, DupSettings, IfdSettings, ImportSettings, TraceSettings, WebAddressSettings, WorkflowSettings, SqmSettings, MarketplaceSettings, EtmSettings, TeamSettings, ThrottleSettings, CustomCodeSettings, MonitoringSettings, MultiEntityQuickFindSettings, QuickFindSettings, OAuthClaimsSettings, and YammerSettings.
Type: | DeploymentObject |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Timeout
For internal use only.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Microsoft.Xrm.Sdk.Deployment.DeploymentObject
System.Int32 System.Management.Automation.SwitchParameter System.Management.Automation.PSCredential System.String
Outputs
System.Object