Getting results of last job from a UA script

Hello!
How can i display the results of the last successful job (in Universal Dashboard) of a script that runs in UA ?
Thank you.

Hey !

You can do something like that:

$Job = Get-UAJob -Script (Get-UAScript -Name Get-Data.ps1) | Select -Last 1
$Data = Get-UAJobPipelineOutput -Job $Job