Using PowerShell Management Agent logging

Build 5.5.3508 and later

The PS MA uses extensive tracing throughout the code. You can get at this information by using DebugView. When configuring and creating/testing script, you can use a tool like DebugView (http://technet.microsoft.com/en-us/sysinternals/bb896647) to catch tracing information from this MA.

TIP - for a more readable trace log in DebugView, you should remove the tick mark at "Force Carriage Returns" under Options in DebugView.

Other errors and script errors that are not caught by the MA and the logging mechanics can be found in the Application Event Log.

Earlier versions

You can redirect logging information to a file. Create and specify the following registry key to set the file name for debugging information.
  • Registry Hive: HKEY_LOCAL_MACHINE\SOFTWARE\Granfeldt\FIM\ManagementAgents\PowerShell
  • Key name (type REG_SZ): DebugLogFilename
  • Value: <path of log file>, i.e. C:\Temp\PSMA-{0:ddd}.log
Also, you can use date time format string to have multiple log files created, i.e. if you want a new log file to be started every day, you could specify the value of DebugLogFilename as C:\Temp\PSMA-{0:ddd}. For more information of specifying date formats, please refer to this article http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx. Make sure that you construct the date time format in a way that is a valid file name. If the registry key is not present, no log file will be created.

Other errors and script errors that are not caught by the MA and the logging mechanics can be found in the Application Event Log.

Last edited Feb 27 at 6:48 PM by Granfeldt, version 2