Error Getting Job Data From Dashboard

Product: PowerShell Universal
Version: 2.11.1

I have a few PSU dashboard pages that collect data from a job (different jobs) and displays it as a table. This all worked fine until my server was restarted. I CAN Get-UAJobOutput outside of the dashboard successfully, but when the dashboard runs it, I get the following error.

“”“Call failed with status code 401 (Unauthorized): GET http://localhost:5000/api/v1/job?Skip=0&Take=-1&OrderBy=Id&OrderDirection=Descending”“”

I tried restarting the PSU windows service but the issue persists. I also tried re-running the jobs to see if that was the issue.

I believe I have found the error. I had to run the connect-udserver cmdlet to authorize the dashboard.

Might wanna use connect-PSUserver. “UD” aliases is removed in V3 :slight_smile:

Same for Get-UAJobOutput = Get-PSUJobOutput

Are you using the -integrated parameter Get-UAJobOutput?

I use the snip below to get the output of the latest job of a script. No need to connect.

(Get-PSUJobOutput -Job (Get-PSUJob -Script (Get-PSUScript -name “Get-DomainAdmins.ps1” -Integrated) -OrderDirection Descending -First 1 -Integrated) -Integrated)

1 Like

Thank you for the callout about the V3 Cmdlets. I was unaware of the -Integrated option, another great callout! I’m new to UD and PSU so I usually search using get-command and grabbing the first Cmdlet that seems to describe what I’m looking to do. Looks like I have quite a bit of UD tools but, so I have some work to do.

1 Like