As part of the migration process I’ve been going through the event logs for our CRM deployment to ensure everything is working correctly, during this I came across an ‘Invalid Trace Directory’ error (event id 17203) which was showing the following –
Invalid Trace Directory. Additional Info:[ Invalid Trace Directory (Reporting Process:Trace Diretory is Null. TraceSettings: {Filename: ,FileCountSuffix:1 ,TraceFileSize:10485760 ,TraceDirectory: ,TracingCallStack:No ,IsTracingOff:Yes ,LoadState:LoadSuccessfulUnreported ,RefreshTraceInt:-1 ,SiteWideRefreshTraceInt:-1 ,RegistryRefreshTraceInt:6 ,Precedence:Default} ] , AppDomain:CrmAsyncService)
This error is because by default the Trace Directory will be set to ‘C:\crmdrop\logs’ which doesn’t normally exist (but you can just create it for a quick fix, I’d suggest changing it using the instructions below though).
Although this error doesn’t cause a huge issue it can keep producing quite a few errors in the event log which nobody likes to see –
Now this is pretty easy to resolve using a bit of PowerShell as I’ll show below.
Ensure You Can Run PowerShell Commands
You may have to set the PowerShell execution policy to unrestricted temporarily if the servers not setup to allow PowerShell commands.
- Open PowerShell.
- Type ‘set-executionpolicy unrestricted’
- Confirm by pressing Y.
- Done you can now run the required PowerShell commands.
Fix The Problem
- Open PowerShell again if required.
- Either type the following code or copy from the end of the article –
Add-PSSnapin Microsoft.Crm.PowerShell Get-CrmSetting TraceSettings $setting=Get-CrmSetting TraceSettings $setting.Directory="C:\Program Files\Microsoft Dynamics CRM\Trace" Set-CrmSetting $setting Get-CrmSetting TraceSettings
- Run the code which should fix the problem.
- Run ‘Set-executionpolicy restricted’ if you changed the execution policy before to revert it back.
Once this is done you’ll hopefully notice there will be no new errors in the event viewer for this issue
The solution does not work for Version 8.2.1.1.176
LikeLike
Hi All im noob here. Good article! Thx! Love your stories!
LikeLike
I’d always want to be update on new posts on this website, saved to my bookmarks!
LikeLike
Hello This is my 1st comment here so I just wanted to give a quick shout out and say I truly enjoy reading through your articles. Can you recommend any other blogs/websites/forums that go over the same topics? Thank you so much|
LikeLike
WOW just what I was looking for. Came here by searching for %meta_keyword%
LikeLike