Configure logging for the PowerShell step
-
- UpdatedFeb 1, 2024
- 2 minutes to read
- Washington DC
- Building applications
Add log messages to the scripts in your PowerShell step. Use log levels for improved logging and debugging.
Before you begin
To add log messages to your script, you will need to use the Write-SNCLog function. This function is defined in the IH\Logging.psm1 module. Use PSScript.ps1 to import this module so inline scripts have access to Write-SNCLog. For more information, see MID Server PowerShell files.
Role required: admin
Procedure
What to do next
The new logs are available in the MID agent log and can be downloaded from the MID Server. For more information, see Download the MID Server files.
If you set the system property to view the logs in the instance, you can see them in the Flow engine log entries tab of the Flow engine context record. For more information, see Flow execution details.
Related Content
- Test a credential for the PowerShell step
Test a configured credential in the PowerShell step. Confirm the credential is working before building the rest of your step.