I have an Azure PowerShell 7.1 runbook in an automation account that is executing as expected. The only issue I have is that my Error Output within the running job screen is always missing the details column. This means I have to click on each record to see what is in it, which is very tedious.
Note: I am using the Write-Error
command to generate these messages inside a try/catch
You can see what I mean in the following picture:
Any help would be greatly appreciated.
Only the graphical PowerShell
runbook type allows you to see the details
column. After trying a workaround, I found a solution using a graphical PowerShell runbook
.
I created a graphical PowerShell runbook
and added my PowerShell
onto the canvas. It was successfully executed and the following output with job details were displayed:
Aside from the runbook messages, you can also add Input and Output
, as shown in the image below.
I've just executed a sample write-error
command.
Write-Error "Hi"
Automation Account -> Runbook (type:Graphical Powershell Runbook)
:
Output: