Skip to main content

Posts

Showing posts with the label Dynamics 365

Enable Trace on Dynamcis 365 on premise using PowerShell

Enable trace settings through Windows PowerShell Note These changes made in Windows PowerShell do not update the Registry. These changes update the DeploymentProperties and ServerSettingsProperties tables in the MSCRM_CONFIG database. Register the cmdlets 1.      Log in to the administrator account on your Microsoft Dynamics CRM server. 2.      In a Windows PowerShell window, type the following command: Add-PSSnapin Microsoft.Crm.PowerShell To obtain a list of the current settings, type the following command: Get-CrmSetting TraceSettings Set the trace settings 1.      Type the following command: $setting = Get-CrmSetting TraceSettings 2.      Type the following command to enable tracing: $setting.Enabled=$True 3.      Type the following command to set the trace settings: Set-CrmSetting $setting 4.      Type the following command...

Fixed: Connect CRMOnline with Custom Timeout

I was having trouble with same issue, I was using Connect-CrmOnline method to connect. But I fixed the issue and am able to pass custom timeout value. I am able to import a solution to Dynamics Online which takes around 22 minutes. I hope this will help. Here is the code: #1  Create ConnectionString $cs = "RequireNewInstance=True" $cs+= ";Username=$($Cred.UserName)" $cs+= ";Password=$($Cred.GetNetworkCredential().Password)" $cs+= ";Url=$CRMServerURL" $cs += ";AuthType=Office365" $cs+=";SkipDiscovery=True" #2  Create a connection using ConnectionString (for Online) $Conn = Get-CrmConnection -ConnectionString $cs -MaxCrmConnectionTimeOutMinutes $CrmConTimeOutMinutes #3  Import Solution Import-CrmSolutionAsync -SolutionFilePath $path -conn $Conn -MaxWaitTimeInSeconds $maxWaitTimeInSeconds -ActivateWorkflows -PublishChanges -BlockUntilImportComplete