Showing posts with label CRM Server. Show all posts
Showing posts with label CRM Server. Show all posts

Thursday, May 26, 2011

Enable Tracing in CRM 2011

Register the cmdlets

  1. Log into the administrator account on your Microsoft Dynamics CRM server.
  2. In a Windows PowerShell window, type the following command:

    Add-PSSnapin Microsoft.Crm.PowerShell



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


Get a list of the current settings. Type the following command:



Get-CrmSetting TraceSettings


The output will resemble the following:

CallStack : True



Categories    : *:Error



Directory     : c:\crmdrop\logs



Enabled       : False



FileSize      : 10



ExtensionData : System.Runtime.Serialization.ExtensionDataObject






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 to get a current list of the trace settings:



    Get-CrmSetting TraceSettings




The output will resemble the following:

CallStack : True



Categories    : *:Error



Directory     : c:\crmdrop\logs



Enabled       : True



FileSize      : 10



ExtensionData : System.Runtime.Serialization.ExtensionDataObject



make sure you have created the directory CRM server will not bother itself to create a directory for you rather it will throw internal exception in deployment manager.