This project is read-only.

Diagnostics with the FIM PowerShell Workflow Activity

One of my favourite things about this FIM activity is the diagnostics output. The activity uses System.Diagnostics to send output to the listener of your choice. Changing the diagnostic output is the same experience as changing the diagnostic output of the FIM Service itself, which means:
  • No recompiling required
  • No new configuration files introduced
  • Uses the same diagnostics infrastructure as the FIM Service
  • Diagnostic output is determined at runtime (I don't have to hard code it anywhere!)

How to configure it

Check out the instructions for configuring the dianostics output:
Adding the System.Diagnostics Entry in the FIM Config File

How it works

FIM calls the FIM PowerShell Workflow Activity, which in turn fires up a new pipeline using the configuration from the activity, including:
  • the WorkflowData items to turn into PowerShell variables
  • a path to a PowerShell module to load
  • the name of a WorkflowData item to store the script output
  • the script itself
This is all the information required to run a PowerShell script, whether it be at the console, or in the WF activity itself.
These details are output in a form that can easily be pasted into a PowerShell window, as shown below.

A Sample Failure in the FIM Request Log


A Sample Trace Event Written to the Event Log


A Sample Script Pasted into PowerShell ISE


Last edited Mar 3, 2011 at 10:10 PM by CraigMartin, version 2


No comments yet.