-
Notifications
You must be signed in to change notification settings - Fork 35
Flat File Connector Troubleshooting
The Windows PowerShell connector supports logging and tracing of connector and script activities for troubleshooting purposes.
Critical errors will be logged to the Application log on the Synchronization Service server and additional tracing can be enabled by the administrator.
When a fatal error occurs while the PowerShell connector is running, or during the configuration of the connector in the Management Agent Designer, the Synchronization Service will log an event with the following details:
Parameter | Value |
---|---|
Log | Application |
Level | Error |
Source | FIMSynchronizationService |
Event ID | 6801 |
Task Category | Server |
If the event log is not providing enough information, then the next step is to get more information from the PowerShell script itself.
To see what the PowerShell script code is doing, find the following snip in the script relevant to the operation you are running (for example import or export).
# Uncomment this line to enable debug logging
# Out-File -InputObject $Message -FilePath $Path -Append
Remove the hash (#) sign from the second line to enable tracing. The files are written to %WinDir%\temp, which is the location the sync engine grants its service account write permissions to for this purpose.
Enabling these logs is the easiest to find easy problems with the PowerShell script code and how it works in your environment. If this does not help, you can enable detailed tracing in the connector itself.
The Windows PowerShell connector can be configured to emit tracing information to any .NET TraceListener (e.g. event log, XML file, text file, etc.).
Administrators can also configure the connector to log information produced by the Write-Warning, Write-Verbose, and Write-Debug cmdlets to the trace log.
- Open the %ProgramFiles%\Microsoft Forefront Identity Manager\2010\Synchronization Service\bin\miiserver.exe.config file using a text editor.
- Paste the following XML in to the file on the line immediately following the sources tag.
<source name="ConnectorsLog" switchValue="Verbose">
<listeners>
<add initializeData="C:\Windows\Temp\ConnectorsTrace.log"
type="System.Diagnostics.TextWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
name="ConnectorsTraceListener">
<filter type="" />
</add>
</listeners>
</source>
The <System.Diagnostics> section of the miiserver.exe.config file should now resemble the following excerpt:
- Restart the Synchronization Service.
As described in the previous section, the service account has write permissions to %WinDir%\Temp and this is the recommended location for trace files to be written.
To trace information from Windows PowerShell scripts, you must complete the following step:
- Add logging to your scripts in the form of Write-Verbose, or Write-Debug statements.
- Home
- Related Projects
- Skype/Lync Connector
- Exchange Connector
- Flat File Connector
- SharePoint Site, User and Group Management Connector
- Home Drive Provisioning
- Oracle Identity Management Connector
- FAQ