Adding the System.Diagnostics Entry in the FIM Config File

The FIM PowerShell WF Activity is decorated with trace statements. These statements do nothing until turned on in the FIM Service configuration file.

To make these changes manually:
  1. Find the Microsoft.ResourceManagement.Service.exe.config file on the FIM server (probably in Program Files\Microsoft Forefront Identity Manager\2010\Service)
  2. Open the file with your favourite editor
  3. Find the <system.diagnostics> node
  4. Add the following entry:
<source name="FimExtensions.FimActivityLibrary" switchValue="Verbose">
  <listeners>
    <remove name='Default' />
    <add 
      name              ="PowerShellActivityLibraryEventLogListener" 
      initializeData    ="PowerShellActivity" 
      type              ="System.Diagnostics.EventLogTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" 
      traceOutputOptions="LogicalOperationStack, DateTime, Timestamp, Callstack"/>
  </listeners>
</source>
  1. Restart the FIM Service service

Here is a snippet from my config file

<system.diagnostics>
  <sources>
    <source name="FimExtensions.FimActivityLibrary" switchValue="Verbose">
      <listeners>
        <remove name='Default' />
        <add
          name              ="PowerShellActivityLibraryEventLogListener"
          initializeData    ="PowerShellActivity"
          type              ="System.Diagnostics.EventLogTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
          traceOutputOptions="LogicalOperationStack, DateTime, Timestamp, Callstack"/>
      </listeners>
    </source>
    <source name="Microsoft.ResourceManagement" switchValue="Information,Error">
      <listeners>
        <add type="System.Diagnostics.DefaultTraceListener" name="Default"/>
        <add name="ExceptionEventLogListener" 
             initializeData="Microsoft.ResourceManagement" 
             type="System.Diagnostics.EventLogTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" 
             traceOutputOptions="LogicalOperationStack, DateTime, Timestamp, Callstack"/>
      </listeners>
    </source>
  </sources>
  <trace autoflush="true"/>
</system.diagnostics>

Last edited Mar 23, 2013 at 12:05 AM by bdesmondMVP, version 6

Comments

pwhipps Jun 14, 2012 at 9:30 AM 
The above references to FimCm* should now just be FIM. For example FimCmExtensions.FimCmActivityLibrary is now FimExtensions.FimActivityLibrary