Add-FlowLogRow -LogType “String” -Message “String”

Add a message to the Session Log
The command is asynchronous so you can monitor the progress of your script as it executes in the Step’s Job tab.

-LogType Argument Description
  • Information
Add an “Information” message. The output of the PowerShell command argument -WarningVarible is picked up when using the variable name FlowWarning. If a warning was issued by preceding PowerShell commands the -LogType “Information” argument will automatically convert into “Warning” and include the value from the $FlowWarning variable in the message.
  • Warning
Add a “Warning message.
  • Error
Add an “Error” message. The action taken depends on the ‘On error’ configuration defined in the section ‘Custom logging’ on the Step’s options tab.
  • StopJob
Add an “Information” message and stop the job.
  • ExitGroup
Add an “Information” message and exit the current Group Step without running any of the following Steps.

Example:
Add-FlowLogRow -LogType "Information" -Message "Something is going on .."

Example of enhanced exception trace logging:

The log generated when an exception is thrown in the above example:

PowerShell samples

Last modified: 4 August 2022