Having problems with the cmdlet “Invoke-PSUScript”. I can get it to work if I use the long hand method.
“Invoke-PSUScript @ScriptParams | Tee-Object -Variable CurrentJob | Wait-PSUJob”
not sure if I am using the cmdlet incorrectly but the line that is causing an error is
“$CurrentJob = Invoke-PSUScript -Script ‘return.ps1’ -Wait”
I also tried “Return.ps1” to see if caps mattered and still got the error.
Had similar issue in my dashboard, so maybe try this tip from Adam:
Invoke-PSUScript -id $EventData.Id -AppToken $PSUAppToken -ComputerName http://localhost:5000
Adding the -ComputerName was the missing part for my task.